mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[+] Server deletion safety
Errors are correctly logged in firebase. User can't break the website anymore. Signed-off-by: Charles Le Maux <charles.le-maux@epitech.eu>
This commit is contained in:
parent
fa9ba6d3e0
commit
cef726b3b6
@ -168,6 +168,7 @@ def server_stop(user: UserRecord, name: str) -> tuple[HTTPStatus, str or None]:
|
||||
user_id: str = user.uid
|
||||
if mc_manager.has_cooldown(user_id=user_id):
|
||||
return HTTPStatus.FORBIDDEN, f"Wait 30 seconds before stopping '{name}'."
|
||||
mc_manager.set_cooldown(user_id=user_id)
|
||||
try:
|
||||
port = firebase_manager.get_server_port(user_id)
|
||||
if port is None:
|
||||
|
Loading…
Reference in New Issue
Block a user