mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # api_sender.html # firebase_manager.py # generic_executor.py
This commit is contained in:
commit
156d95c1cb
@ -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'
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user