mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
[Gateway Endpoint] Encode response as JSON
This commit is contained in:
parent
05cff32522
commit
7dab8f9435
@ -5,7 +5,8 @@ const router = Router();
|
|||||||
|
|
||||||
router.get("/", (req: Request, res: Response) => {
|
router.get("/", (req: Request, res: Response) => {
|
||||||
const { endpoint } = Config.get().gateway;
|
const { endpoint } = Config.get().gateway;
|
||||||
res.send({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" });
|
res.setHeader('Content-Type', 'application/json');
|
||||||
|
res.send(JSON.stringify({ url: endpoint || process.env.GATEWAY || "ws://localhost:3002" }));
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
Loading…
Reference in New Issue
Block a user