summary refs log tree commit diff
path: root/src/routes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-30 19:58:15 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-30 19:58:15 +0100
commit76000f8fa11dde2f67efdb22a87c4644ea49f9eb (patch)
tree67664d9c616068113b8fef6704b005726be8f0a7 /src/routes
parent:sparkles: Database (diff)
downloadserver-76000f8fa11dde2f67efdb22a87c4644ea49f9eb.tar.xz
:sparkles: Util
Diffstat (limited to '')
-rw-r--r--src/routes/api/v8/auth/login.ts9
-rw-r--r--src/routes/api/v8/auth/register.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/followers.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/index.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/invites.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/messages.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/permissions.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/pins.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/recipients.ts4
-rw-r--r--src/routes/api/v8/channel/#CHANNELID/typing.ts4
-rw-r--r--src/routes/api/v8/guilds/index.ts4
-rw-r--r--src/routes/api/v8/guilds/templates/index.ts4
-rw-r--r--src/routes/api/v8/invite/index.ts4
-rw-r--r--src/routes/assets/index.ts6
14 files changed, 60 insertions, 3 deletions
diff --git a/src/routes/api/v8/auth/login.ts b/src/routes/api/v8/auth/login.ts

index e69de29b..6d72893b 100644 --- a/src/routes/api/v8/auth/login.ts +++ b/src/routes/api/v8/auth/login.ts
@@ -0,0 +1,9 @@ +import { Request, Response, Router } from "express"; +import { check } from "../../../../util/instanceOf"; +const router: Router = Router(); + +router.post("/", check({ test: String, $user: String }), (req: Request, res: Response) => { + res.send("OK"); +}); + +export default router; diff --git a/src/routes/api/v8/auth/register.ts b/src/routes/api/v8/auth/register.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/auth/register.ts +++ b/src/routes/api/v8/auth/register.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/followers.ts b/src/routes/api/v8/channel/#CHANNELID/followers.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/followers.ts +++ b/src/routes/api/v8/channel/#CHANNELID/followers.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/index.ts b/src/routes/api/v8/channel/#CHANNELID/index.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/index.ts +++ b/src/routes/api/v8/channel/#CHANNELID/index.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/invites.ts b/src/routes/api/v8/channel/#CHANNELID/invites.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/invites.ts +++ b/src/routes/api/v8/channel/#CHANNELID/invites.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/messages.ts b/src/routes/api/v8/channel/#CHANNELID/messages.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/messages.ts +++ b/src/routes/api/v8/channel/#CHANNELID/messages.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/permissions.ts b/src/routes/api/v8/channel/#CHANNELID/permissions.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/permissions.ts +++ b/src/routes/api/v8/channel/#CHANNELID/permissions.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/pins.ts b/src/routes/api/v8/channel/#CHANNELID/pins.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/pins.ts +++ b/src/routes/api/v8/channel/#CHANNELID/pins.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/recipients.ts b/src/routes/api/v8/channel/#CHANNELID/recipients.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/recipients.ts +++ b/src/routes/api/v8/channel/#CHANNELID/recipients.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/channel/#CHANNELID/typing.ts b/src/routes/api/v8/channel/#CHANNELID/typing.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/channel/#CHANNELID/typing.ts +++ b/src/routes/api/v8/channel/#CHANNELID/typing.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/guilds/index.ts b/src/routes/api/v8/guilds/index.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/guilds/index.ts +++ b/src/routes/api/v8/guilds/index.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/guilds/templates/index.ts b/src/routes/api/v8/guilds/templates/index.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/guilds/templates/index.ts +++ b/src/routes/api/v8/guilds/templates/index.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/api/v8/invite/index.ts b/src/routes/api/v8/invite/index.ts
index e69de29b..9a4e81fa 100644 --- a/src/routes/api/v8/invite/index.ts +++ b/src/routes/api/v8/invite/index.ts
@@ -0,0 +1,4 @@ +import { Router } from "express"; +const router: Router = Router(); + +export default router; diff --git a/src/routes/assets/index.ts b/src/routes/assets/index.ts
index c2b9f2b0..df30d13e 100644 --- a/src/routes/assets/index.ts +++ b/src/routes/assets/index.ts
@@ -3,10 +3,10 @@ * (../../client/index.html) */ import { Router } from "express"; -import fetch from "node-fetch"; +import fetch, { Response } from "node-fetch"; -const router = Router(); -const cache = new Map(); +const router: Router = Router(); +const cache = new Map<string, Response>(); const assetEndpoint = "https://discord.com/assets/"; export async function getCache(key: string): Promise<Response> {