summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/routes/assets/index.ts34
-rw-r--r--src/routes/auth/login.ts (renamed from src/routes/api/v8/auth/login.ts)0
-rw-r--r--src/routes/auth/register.ts (renamed from src/routes/api/v8/auth/register.ts)0
-rw-r--r--src/routes/channels/#channel_id/followers.ts (renamed from src/routes/api/v8/channels/#channel_id/followers.ts)0
-rw-r--r--src/routes/channels/#channel_id/index.ts (renamed from src/routes/api/v8/channels/#channel_id/index.ts)0
-rw-r--r--src/routes/channels/#channel_id/invites.ts (renamed from src/routes/api/v8/channels/#channel_id/invites.ts)0
-rw-r--r--src/routes/channels/#channel_id/messages/bulk-delete.ts (renamed from src/routes/api/v8/channels/#channel_id/messages/bulk-delete.ts)0
-rw-r--r--src/routes/channels/#channel_id/messages/index.ts (renamed from src/routes/api/v8/channels/#channel_id/messages/index.ts)0
-rw-r--r--src/routes/channels/#channel_id/permissions.ts (renamed from src/routes/api/v8/channels/#channel_id/permissions.ts)0
-rw-r--r--src/routes/channels/#channel_id/pins.ts (renamed from src/routes/api/v8/channels/#channel_id/pins.ts)0
-rw-r--r--src/routes/channels/#channel_id/recipients.ts (renamed from src/routes/api/v8/channels/#channel_id/recipients.ts)0
-rw-r--r--src/routes/channels/#channel_id/typing.ts (renamed from src/routes/api/v8/channels/#channel_id/typing.ts)0
-rw-r--r--src/routes/channels/#channel_id/webhooks.ts (renamed from src/routes/api/v8/channels/#channel_id/webhooks.ts)0
-rw-r--r--src/routes/guilds/#id/bans.ts (renamed from src/routes/api/v8/guilds/#id/bans.ts)0
-rw-r--r--src/routes/guilds/#id/channels.ts (renamed from src/routes/api/v8/guilds/#id/channels.ts)0
-rw-r--r--src/routes/guilds/#id/index.ts (renamed from src/routes/api/v8/guilds/#id/index.ts)0
-rw-r--r--src/routes/guilds/#id/members.ts (renamed from src/routes/api/v8/guilds/#id/members.ts)0
-rw-r--r--src/routes/guilds/index.ts (renamed from src/routes/api/v8/guilds/index.ts)0
-rw-r--r--src/routes/guilds/templates/index.ts (renamed from src/routes/api/v8/guilds/templates/index.ts)0
-rw-r--r--src/routes/invites/index.ts (renamed from src/routes/api/v8/invites/index.ts)0
-rw-r--r--src/routes/test.ts14
-rw-r--r--src/routes/users/@me/guilds.ts (renamed from src/routes/api/v8/users/@me/guilds.ts)0
-rw-r--r--src/routes/users/@me/index.ts (renamed from src/routes/api/v8/users/@me/index.ts)0
23 files changed, 0 insertions, 48 deletions
diff --git a/src/routes/assets/index.ts b/src/routes/assets/index.ts
deleted file mode 100644

index df30d13e..00000000 --- a/src/routes/assets/index.ts +++ /dev/null
@@ -1,34 +0,0 @@ -/** - * * patch to redirect requests from cloned client - * (../../client/index.html) - */ -import { Router } from "express"; -import fetch, { Response } from "node-fetch"; - -const router: Router = Router(); -const cache = new Map<string, Response>(); -const assetEndpoint = "https://discord.com/assets/"; - -export async function getCache(key: string): Promise<Response> { - let cachedRessource = cache.get(key); - - if (!cachedRessource) { - const res = await fetch(assetEndpoint + key); - // @ts-ignore - res.bufferResponse = await res.buffer(); - cache.set(key, res); - cachedRessource = res; - } - - return cachedRessource; -} - -router.get("/:hash", async (req, res) => { - res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24); - const cache = await getCache(req.params.hash); - res.set("content-type", <string>cache.headers.get("content-type")); - // @ts-ignore - res.send(cache.bufferResponse); -}); - -export default router; diff --git a/src/routes/api/v8/auth/login.ts b/src/routes/auth/login.ts
index 3f924e7c..3f924e7c 100644 --- a/src/routes/api/v8/auth/login.ts +++ b/src/routes/auth/login.ts
diff --git a/src/routes/api/v8/auth/register.ts b/src/routes/auth/register.ts
index 99df82f1..99df82f1 100644 --- a/src/routes/api/v8/auth/register.ts +++ b/src/routes/auth/register.ts
diff --git a/src/routes/api/v8/channels/#channel_id/followers.ts b/src/routes/channels/#channel_id/followers.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/followers.ts +++ b/src/routes/channels/#channel_id/followers.ts
diff --git a/src/routes/api/v8/channels/#channel_id/index.ts b/src/routes/channels/#channel_id/index.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/index.ts +++ b/src/routes/channels/#channel_id/index.ts
diff --git a/src/routes/api/v8/channels/#channel_id/invites.ts b/src/routes/channels/#channel_id/invites.ts
index 4c21e7d4..4c21e7d4 100644 --- a/src/routes/api/v8/channels/#channel_id/invites.ts +++ b/src/routes/channels/#channel_id/invites.ts
diff --git a/src/routes/api/v8/channels/#channel_id/messages/bulk-delete.ts b/src/routes/channels/#channel_id/messages/bulk-delete.ts
index c805cf08..c805cf08 100644 --- a/src/routes/api/v8/channels/#channel_id/messages/bulk-delete.ts +++ b/src/routes/channels/#channel_id/messages/bulk-delete.ts
diff --git a/src/routes/api/v8/channels/#channel_id/messages/index.ts b/src/routes/channels/#channel_id/messages/index.ts
index ade048a0..ade048a0 100644 --- a/src/routes/api/v8/channels/#channel_id/messages/index.ts +++ b/src/routes/channels/#channel_id/messages/index.ts
diff --git a/src/routes/api/v8/channels/#channel_id/permissions.ts b/src/routes/channels/#channel_id/permissions.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/permissions.ts +++ b/src/routes/channels/#channel_id/permissions.ts
diff --git a/src/routes/api/v8/channels/#channel_id/pins.ts b/src/routes/channels/#channel_id/pins.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/pins.ts +++ b/src/routes/channels/#channel_id/pins.ts
diff --git a/src/routes/api/v8/channels/#channel_id/recipients.ts b/src/routes/channels/#channel_id/recipients.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/recipients.ts +++ b/src/routes/channels/#channel_id/recipients.ts
diff --git a/src/routes/api/v8/channels/#channel_id/typing.ts b/src/routes/channels/#channel_id/typing.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/typing.ts +++ b/src/routes/channels/#channel_id/typing.ts
diff --git a/src/routes/api/v8/channels/#channel_id/webhooks.ts b/src/routes/channels/#channel_id/webhooks.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/channels/#channel_id/webhooks.ts +++ b/src/routes/channels/#channel_id/webhooks.ts
diff --git a/src/routes/api/v8/guilds/#id/bans.ts b/src/routes/guilds/#id/bans.ts
index 5133ee3c..5133ee3c 100644 --- a/src/routes/api/v8/guilds/#id/bans.ts +++ b/src/routes/guilds/#id/bans.ts
diff --git a/src/routes/api/v8/guilds/#id/channels.ts b/src/routes/guilds/#id/channels.ts
index 1316a2ca..1316a2ca 100644 --- a/src/routes/api/v8/guilds/#id/channels.ts +++ b/src/routes/guilds/#id/channels.ts
diff --git a/src/routes/api/v8/guilds/#id/index.ts b/src/routes/guilds/#id/index.ts
index e86d9416..e86d9416 100644 --- a/src/routes/api/v8/guilds/#id/index.ts +++ b/src/routes/guilds/#id/index.ts
diff --git a/src/routes/api/v8/guilds/#id/members.ts b/src/routes/guilds/#id/members.ts
index 0aed61ae..0aed61ae 100644 --- a/src/routes/api/v8/guilds/#id/members.ts +++ b/src/routes/guilds/#id/members.ts
diff --git a/src/routes/api/v8/guilds/index.ts b/src/routes/guilds/index.ts
index 319184ad..319184ad 100644 --- a/src/routes/api/v8/guilds/index.ts +++ b/src/routes/guilds/index.ts
diff --git a/src/routes/api/v8/guilds/templates/index.ts b/src/routes/guilds/templates/index.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/guilds/templates/index.ts +++ b/src/routes/guilds/templates/index.ts
diff --git a/src/routes/api/v8/invites/index.ts b/src/routes/invites/index.ts
index 9a4e81fa..9a4e81fa 100644 --- a/src/routes/api/v8/invites/index.ts +++ b/src/routes/invites/index.ts
diff --git a/src/routes/test.ts b/src/routes/test.ts deleted file mode 100644
index b488d6e4..00000000 --- a/src/routes/test.ts +++ /dev/null
@@ -1,14 +0,0 @@ -import { Router } from "express"; -import { getPermission, MemberModel, db } from "fosscord-server-util"; -import { Types } from "mongoose"; -const router: Router = Router(); - -router.get("/", async (req, res) => { - // @ts-ignore - const perm = await getPermission(813185668657184768n, 813189959920910336n); - console.log(perm); - if (perm.has("ADD_REACTIONS")) console.log("add"); - res.send("OK"); -}); - -export default router; diff --git a/src/routes/api/v8/users/@me/guilds.ts b/src/routes/users/@me/guilds.ts
index a2a64ce6..a2a64ce6 100644 --- a/src/routes/api/v8/users/@me/guilds.ts +++ b/src/routes/users/@me/guilds.ts
diff --git a/src/routes/api/v8/users/@me/index.ts b/src/routes/users/@me/index.ts
index 32877dcc..32877dcc 100644 --- a/src/routes/api/v8/users/@me/index.ts +++ b/src/routes/users/@me/index.ts