Merge remote-tracking branch 'origin/master'

# Conflicts:
#	api_sender.html
#	firebase_manager.py
#	generic_executor.py
This commit is contained in:
Charles Le Maux 2024-06-30 00:35:57 +01:00
commit 156d95c1cb
2 changed files with 1 additions and 6 deletions

View File

@ -100,7 +100,7 @@ document.addEventListener('DOMContentLoaded', () => {
});
function sendRequest(endpoint, payload) {
return fetch(`http://localhost:3000/${endpoint}`, {
return fetch(`https://176.165.62.226:3000/${endpoint}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'

View File

@ -149,13 +149,8 @@ def server_run(user: UserRecord, name: str) -> tuple[HTTPStatus, str or None]:
def server_stop(user: UserRecord, name: str) -> tuple[HTTPStatus, str or None]:
port = None
user_id = user.uid
try:
port = firebase_manager.get_server_port(user.uid)
try:
firebase_manager.update_server_running_state(user_id, name, False)
except Exception:
pass
if port is None:
return HTTPStatus.NOT_FOUND, f"Server {name} not found in firestore."
exists: bool = mc_manager.stop_server(port)