summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 03:58:27 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 03:58:27 +0200
commit8b64ab4f3821cde44abd2e0e5403d38797bc516a (patch)
treed51a17b14b084b84358d4a614620d19440108433
parent:sparkles: init test client (diff)
downloadserver-8b64ab4f3821cde44abd2e0e5403d38797bc516a.tar.xz
:construction: experiments + gateway route
-rw-r--r--src/middlewares/Authentication.ts8
-rw-r--r--src/routes/experiments.ts10
-rw-r--r--src/routes/gateway.ts9
3 files changed, 26 insertions, 1 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts

index 4bfa219a..595bcf73 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts
@@ -2,7 +2,13 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; import { checkToken } from "fosscord-server-util"; -export const NO_AUTHORIZATION_ROUTES = ["/api/v8/auth/login", "/api/v8/auth/register", "/api/v8/webhooks/"]; +export const NO_AUTHORIZATION_ROUTES = [ + "/api/v8/auth/login", + "/api/v8/auth/register", + "/api/v8/webhooks/", + "/api/v8/gateway", + "/api/v8/experiments", +]; declare global { namespace Express { diff --git a/src/routes/experiments.ts b/src/routes/experiments.ts new file mode 100644
index 00000000..6bca49c5 --- /dev/null +++ b/src/routes/experiments.ts
@@ -0,0 +1,10 @@ +import { Router } from "express"; + +const router = Router(); + +router.get("/", (req, res) => { + // TODO: + res.send({ fingerprint: "", assignments: [] }); +}); + +export default router; diff --git a/src/routes/gateway.ts b/src/routes/gateway.ts new file mode 100644
index 00000000..53302f12 --- /dev/null +++ b/src/routes/gateway.ts
@@ -0,0 +1,9 @@ +import { Router } from "express"; + +const router = Router(); + +router.get("/", (req, res) => { + res.send({ url: "ws://localhost:8080" }); +}); + +export default router;