mirror of
https://github.com/spacebarchat/server.git
synced 2024-09-22 02:31:36 +02:00
🚧 experiments + gateway route
This commit is contained in:
parent
6e009484a6
commit
8b64ab4f38
@ -2,7 +2,13 @@ import { NextFunction, Request, Response } from "express";
|
|||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
import { checkToken } from "fosscord-server-util";
|
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 {
|
declare global {
|
||||||
namespace Express {
|
namespace Express {
|
||||||
|
10
src/routes/experiments.ts
Normal file
10
src/routes/experiments.ts
Normal 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
9
src/routes/gateway.ts
Normal 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;
|
Loading…
Reference in New Issue
Block a user