From e5ed599b483a91a058d4ccd46220dea8ef3fcee1 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 14 Oct 2021 19:47:10 +0200 Subject: [PATCH] :art: restructure --- api/src/routes/template.ts.disabled | 5 +++-- gateway/client.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/routes/template.ts.disabled b/api/src/routes/template.ts.disabled index ad785f10..fcc59ef4 100644 --- a/api/src/routes/template.ts.disabled +++ b/api/src/routes/template.ts.disabled @@ -1,10 +1,11 @@ //TODO: this is a template for a generic route import { Router, Request, Response } from "express"; +import { route } from "@fosscord/api"; const router = Router(); -router.get("/", async (req: Request, res: Response) => { - res.send({}); +router.get("/",route({}), async (req: Request, res: Response) => { + res.json({}); }); export default router; diff --git a/gateway/client.js b/gateway/client.js index 34a59458..c841c6a0 100644 --- a/gateway/client.js +++ b/gateway/client.js @@ -3,7 +3,7 @@ const WebSocket = require("ws"); const Constants = require("./dist/util/Constants"); // const ws = new WebSocket("ws://127.0.0.1:8080"); -const ws = new WebSocket("wss://gateway.discord.gg"); +const ws = new WebSocket("wss://dev.fosscord.com"); ws.on("open", () => { // ws.send(JSON.stringify({ req_type: "new_auth" }));