summary refs log tree commit diff
diff options
context:
space:
mode:
authorxnacly <matteogropp@protonmail.com>2021-09-03 21:36:19 +0200
committerxnacly <matteogropp@protonmail.com>2021-09-03 21:36:19 +0200
commit3aaf4c8a57f339aa705ead786c4fd17cb845f42e (patch)
tree2f08cd5ddd84e2529d1a66a2859619663b2b46f7
parentadded big todo list to Guild.ts (big chungus) (diff)
downloadserver-3aaf4c8a57f339aa705ead786c4fd17cb845f42e.tar.xz
Revert "added big todo list to Guild.ts (big chungus)"
This reverts commit 4a63e1560c07c938ec74f14e5076ec4e69de7ce6.
-rw-r--r--api/src/middlewares/RateLimit.ts1
-rw-r--r--api/src/routes/discoverable-guilds.ts14
-rw-r--r--util/src/entities/Guild.ts38
3 files changed, 1 insertions, 52 deletions
diff --git a/api/src/middlewares/RateLimit.ts b/api/src/middlewares/RateLimit.ts
index a15ccbe6..dffbc0d9 100644
--- a/api/src/middlewares/RateLimit.ts
+++ b/api/src/middlewares/RateLimit.ts
@@ -107,7 +107,6 @@ export default function rateLimit(opts: {
 }
 
 export async function initRateLimits(app: Router) {
-	return;
 	const { routes, global, ip, error } = Config.get().limits.rate;
 	await listenEvent(EventRateLimit, (event) => {
 		Cache.set(event.channel_id as string, event.data);
diff --git a/api/src/routes/discoverable-guilds.ts b/api/src/routes/discoverable-guilds.ts
deleted file mode 100644
index 6ff43cdc..00000000
--- a/api/src/routes/discoverable-guilds.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Guild } from "@fosscord/util";
-import { Router, Request, Response } from "express";
-import { In } from "typeorm";
-
-const router = Router();
-
-router.get("/", async (req: Request, res: Response) => {
-	const { limit } = req.params;
-
-	const guilds = await Guild.find({ where: { features: "PENIS" } }); //, take: Math.abs(Number(limit)) });
-	res.send({ guilds: guilds });
-});
-
-export default router;
diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts
index 027e99c7..434699ac 100644
--- a/util/src/entities/Guild.ts
+++ b/util/src/entities/Guild.ts
@@ -16,42 +16,7 @@ import { Webhook } from "./Webhook";
 // TODO: guild_scheduled_events
 // TODO: stage_instances
 // TODO: threads
-// TODO: description
-// TODO: categories:
-// [{
-// 	"id": 16,
-// 	"name": {
-// 		"default": "Anime & Manga",
-// 		"localizations": {
-// 			"de": "Anime & Manga",
-// 			"fr": "Anim\u00e9s et mangas",
-// 			"ru": "\u0410\u043d\u0438\u043c\u0435 \u0438 \u043c\u0430\u043d\u0433\u0430"
-// 		}
-// 	},
-// 	"is_primary": false
-// }]
-// TODO:
-//  primary_category :{
-// 	id: 1,
-// 	name: {
-// 		default: "Gaming",
-// 		localizations: { de: "Gaming", fr: "Gaming", ru: "\u0418\u0433\u0440\u044b" },
-// 		is_primary: true,
-// 	},
-// };
-// TODO:
-// "keywords": [
-// 		"Genshin Impact",
-// 		"Paimon",
-// 		"Honkai Impact",
-// 		"ARPG",
-// 		"Open-World",
-// 		"Waifu",
-// 		"Anime",
-// 		"Genshin",
-// 		"miHoYo",
-// 		"Gacha"
-// 	],
+
 export const PublicGuildRelations = ["channels", "emojis", "members", "roles", "stickers", "voice_states"];
 
 @Entity("guilds")
@@ -93,7 +58,6 @@ export class Guild extends BaseClass {
 
 	@Column({ type: "simple-array" })
 	features: string[]; //TODO use enum
-	//TODO: https://discord.com/developers/docs/resources/guild#guild-object-guild-features
 
 	@Column({ nullable: true })
 	icon?: string;