daytimedrinkingclub / shipstation

Generate and manage your personal website and portfolio with ease
https://shipstation.ai/
73 stars 58 forks source link

Enable locking available ships #14

Open ptmaroct opened 2 months ago

ptmaroct commented 2 months ago

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

PREMPRAKASHSINGH commented 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.

ptmaroct commented 2 months ago

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

PREMPRAKASHSINGH commented 2 months ago

@ptmaroct Raised a PR #28 . Let me know if logic is correct then will remove the commented code.