diff options
author | uurgothat <cckhmck@gmail.com> | 2021-11-17 22:28:41 +0300 |
---|---|---|
committer | uurgothat <cckhmck@gmail.com> | 2021-11-17 22:28:41 +0300 |
commit | bdc447e44848bba307d7fabc6e31c98fa3f6a4c4 (patch) | |
tree | 0c2973982a9b5fa5323d552d80d1ae4489c837a1 /api/src | |
parent | Add instance route (diff) | |
download | server-bdc447e44848bba307d7fabc6e31c98fa3f6a4c4.tar.xz |
Minor API stuff
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/routes/guilds/templates/index.ts | 5 | ||||
-rw-r--r-- | api/src/routes/track.ts | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/api/src/routes/guilds/templates/index.ts b/api/src/routes/guilds/templates/index.ts index dd906198..98e42d1c 100644 --- a/api/src/routes/guilds/templates/index.ts +++ b/api/src/routes/guilds/templates/index.ts @@ -1,11 +1,10 @@ import { Request, Response, Router } from "express"; -const router: Router = Router(); import { Template, Guild, Role, Snowflake, Config, User, Member } from "@fosscord/util"; -const { enabled, allowTemplateCreation, allowDiscordTemplates, allowRaws } = Config.get().templates; import { route } from "@fosscord/api"; import { DiscordApiErrors } from "@fosscord/util"; import fetch from "node-fetch"; - +const router: Router = Router(); +const { enabled, allowTemplateCreation, allowDiscordTemplates, allowRaws } = Config.get().templates; export interface GuildTemplateCreateSchema { name: string; diff --git a/api/src/routes/track.ts b/api/src/routes/track.ts new file mode 100644 index 00000000..8556a3ad --- /dev/null +++ b/api/src/routes/track.ts @@ -0,0 +1,11 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.post("/", route({}), (req: Request, res: Response) => { + // TODO: + res.sendStatus(204); +}); + +export default router; |