1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

🚧 experiments + gateway route

This commit is contained in:
Flam3rboy 2021-04-06 03:58:27 +02:00
parent 6e009484a6
commit 8b64ab4f38
3 changed files with 26 additions and 1 deletions

View File

@ -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 {

10
src/routes/experiments.ts Normal file
View File

@ -0,0 +1,10 @@
import { Router } from "express";
const router = Router();
router.get("/", (req, res) => {
// TODO:
res.send({ fingerprint: "", assignments: [] });
});
export default router;

9
src/routes/gateway.ts Normal file
View File

@ -0,0 +1,9 @@
import { Router } from "express";
const router = Router();
router.get("/", (req, res) => {
res.send({ url: "ws://localhost:8080" });
});
export default router;