diff options
author | uurgothat <cckhmck@gmail.com> | 2021-09-30 17:57:51 +0300 |
---|---|---|
committer | uurgothat <cckhmck@gmail.com> | 2021-09-30 17:57:51 +0300 |
commit | 9e07c72a72e60ca8c3c3e6270867accd32b56ece (patch) | |
tree | 730cedf62e5075fd3f3d165d3e1fcbb1a81b91db /api/src/routes/users | |
parent | Merge pull request #402 from Thesourtimes/master (diff) | |
download | server-9e07c72a72e60ca8c3c3e6270867accd32b56ece.tar.xz |
Add misc routes
Diffstat (limited to 'api/src/routes/users')
-rw-r--r-- | api/src/routes/users/@me/activities/statistics/applications.ts | 11 | ||||
-rw-r--r-- | api/src/routes/users/@me/billing/payment-sources.ts | 11 | ||||
-rw-r--r-- | api/src/routes/users/@me/email-settings.ts | 19 | ||||
-rw-r--r-- | api/src/routes/users/@me/entitlements.ts | 12 | ||||
-rw-r--r-- | api/src/routes/users/@me/guilds/premium/subscription-slots.ts | 11 | ||||
-rw-r--r-- | api/src/routes/users/@me/notes.ts | 11 |
6 files changed, 75 insertions, 0 deletions
diff --git a/api/src/routes/users/@me/activities/statistics/applications.ts b/api/src/routes/users/@me/activities/statistics/applications.ts new file mode 100644 index 00000000..834be35c --- /dev/null +++ b/api/src/routes/users/@me/activities/statistics/applications.ts @@ -0,0 +1,11 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.get("/", route({}), (req: Request, res: Response) => { + // TODO: + res.json([]).status(200) +}); + +export default router; diff --git a/api/src/routes/users/@me/billing/payment-sources.ts b/api/src/routes/users/@me/billing/payment-sources.ts new file mode 100644 index 00000000..834be35c --- /dev/null +++ b/api/src/routes/users/@me/billing/payment-sources.ts @@ -0,0 +1,11 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.get("/", route({}), (req: Request, res: Response) => { + // TODO: + res.json([]).status(200) +}); + +export default router; diff --git a/api/src/routes/users/@me/email-settings.ts b/api/src/routes/users/@me/email-settings.ts new file mode 100644 index 00000000..2d961a0e --- /dev/null +++ b/api/src/routes/users/@me/email-settings.ts @@ -0,0 +1,19 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.get("/", route({}), (req: Request, res: Response) => { + // TODO: + res.json({ + categories: { + social: true, + communication: true, + tips: false, + updates_and_announcements: false, + recommendations_and_events: false }, + initialized: false + }).status(200); +}); + +export default router; diff --git a/api/src/routes/users/@me/entitlements.ts b/api/src/routes/users/@me/entitlements.ts new file mode 100644 index 00000000..7be3634b --- /dev/null +++ b/api/src/routes/users/@me/entitlements.ts @@ -0,0 +1,12 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.get("/gifts", route({}), (req: Request, res: Response) => { + // TODO: + //const { locale, primary_only } = req.query; + res.json([]).status(200); +}); + +export default router; diff --git a/api/src/routes/users/@me/guilds/premium/subscription-slots.ts b/api/src/routes/users/@me/guilds/premium/subscription-slots.ts new file mode 100644 index 00000000..b487a2ce --- /dev/null +++ b/api/src/routes/users/@me/guilds/premium/subscription-slots.ts @@ -0,0 +1,11 @@ +import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; + +const router = Router(); + +router.get("/", route({}), (req: Request, res: Response) => { + // TODO: + res.json([]).status(200)); +}); + +export default router; diff --git a/api/src/routes/users/@me/notes.ts b/api/src/routes/users/@me/notes.ts new file mode 100644 index 00000000..235c2baf --- /dev/null +++ b/api/src/routes/users/@me/notes.ts @@ -0,0 +1,11 @@ +import { Request, Response, Router } from "express"; +import { route } from "@fosscord/api"; + +const router: Router = Router(); + +router.put("/", route({}), async (req: Request, res: Response) => { + //TODO + res.json({code: 0}).status(400); +}); + +export default router; |