mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[~] Fix : added server state update at /serverStop
Signed-off-by: Charles Le Maux <charles.le-maux@epitech.eu>
This commit is contained in:
parent
156d95c1cb
commit
6b9df8e668
@ -100,7 +100,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
|
||||
function sendRequest(endpoint, payload) {
|
||||
return fetch(`https://176.165.62.226:3000/${endpoint}`, {
|
||||
return fetch(`http://176.165.62.226:3000/${endpoint}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
@ -155,6 +155,7 @@ def server_stop(user: UserRecord, name: str) -> tuple[HTTPStatus, str or None]:
|
||||
return HTTPStatus.NOT_FOUND, f"Server {name} not found in firestore."
|
||||
exists: bool = mc_manager.stop_server(port)
|
||||
if exists:
|
||||
firebase_manager.update_server_running_state(user.uid, name, False)
|
||||
return HTTPStatus.OK, f"Successfully stopped server {name}."
|
||||
return HTTPStatus.OK, f"Server {name} already stopped."
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user