From be164e7d2a5abe8443e78228ade21526cf263a5c Mon Sep 17 00:00:00 2001 From: uurgothat Date: Sun, 17 Oct 2021 21:51:19 +0300 Subject: [PATCH 1/2] oauth2 route draft to return an empty array --- api/src/routes/oauth2/tokens.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 api/src/routes/oauth2/tokens.ts diff --git a/api/src/routes/oauth2/tokens.ts b/api/src/routes/oauth2/tokens.ts new file mode 100644 index 00000000..2bea4af7 --- /dev/null +++ b/api/src/routes/oauth2/tokens.ts @@ -0,0 +1,12 @@ +//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("/",route({}), async (req: Request, res: Response) => { + //TODO + res.json([]); +}); + +export default router; From 4a6ecd0b15441c4b826184cb227469fa66ae159d Mon Sep 17 00:00:00 2001 From: Kuna <65683493+Thesourtimes@users.noreply.github.com> Date: Sun, 17 Oct 2021 21:54:59 +0300 Subject: [PATCH 2/2] remove template comment --- api/src/routes/oauth2/tokens.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/src/routes/oauth2/tokens.ts b/api/src/routes/oauth2/tokens.ts index 2bea4af7..3657176d 100644 --- a/api/src/routes/oauth2/tokens.ts +++ b/api/src/routes/oauth2/tokens.ts @@ -1,5 +1,3 @@ -//TODO: this is a template for a generic route - import { Router, Request, Response } from "express"; import { route } from "@fosscord/api"; const router = Router();