Open ptmaroct opened 2 months ago
By credits we mean available_ships
right?
Since we want to enable locking, how about deducting credits at the startProject
event and in case it gets aborted due to any reasons then add back the deducted credits?
Let me know if this approach is fine, if yes then I will start working on it.
Yes works fine. Can add a catch handling to revert the available ships value as well but needs to be correct in logic. Discuss the logic once or send a pr
@ptmaroct Raised a PR #28 . Let me know if logic is correct then will remove the commented code.
Currently credit gets deducted on generation completion, in the meantime if user tries again to create a new website, they are able to. Implement locking or reduce credits as the start of generation when we are sure website will get created definitely