Update server/status.js
Fix status API server syntax
This commit is contained in:
@@ -14,7 +14,6 @@ result: null,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
|
||||||
let parsed;
|
let parsed;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -129,8 +128,6 @@ socket.on('close', () => {
|
|||||||
result: null,
|
result: null,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
```
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +185,6 @@ if (req.url === '/api/status') {
|
|||||||
try {
|
try {
|
||||||
const status = await getStatus();
|
const status = await getStatus();
|
||||||
|
|
||||||
```
|
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
});
|
});
|
||||||
@@ -210,8 +206,6 @@ const status = await getStatus();
|
|||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
```
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res.writeHead(404);
|
res.writeHead(404);
|
||||||
|
|||||||
Reference in New Issue
Block a user