summary refs log tree commit diff
path: root/api/src/routes/partners
diff options
context:
space:
mode:
authorFeatyre <twooter.0g179@simplelogin.co>2022-01-24 22:59:14 +0800
committerFeatyre <twooter.0g179@simplelogin.co>2022-01-24 22:59:14 +0800
commitcc492f07dcc2be60ef6396c690028da4bcea546b (patch)
treeeb4ec0989289cb4e3cbaa2ded5f1c4db8ff42561 /api/src/routes/partners
parentPrep for Category db work (diff)
downloadserver-cc492f07dcc2be60ef6396c690028da4bcea546b.tar.xz
Partnet + Discover fix and join
Diffstat (limited to 'api/src/routes/partners')
-rw-r--r--api/src/routes/partners/#guild_id/requirements.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/api/src/routes/partners/#guild_id/requirements.ts b/api/src/routes/partners/#guild_id/requirements.ts
new file mode 100644
index 00000000..545c5c78
--- /dev/null
+++ b/api/src/routes/partners/#guild_id/requirements.ts
@@ -0,0 +1,40 @@
+
+import { Guild, Config } from "@fosscord/util";
+
+import { Router, Request, Response } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	const { guild_id } = req.params;	
+    // TODO:
+    // Load from database
+    // Admin control, but for now it allows anyone to be discoverable
+
+	res.send({
+		guild_id: guild_id,
+		safe_environment: true,
+        healthy: true,
+        health_score_pending: false,
+        size: true,
+        nsfw_properties: {},
+        protected: true,
+        sufficient: true,
+        sufficient_without_grace_period: true,
+        valid_rules_channel: true,
+        retention_healthy: true,
+        engagement_healthy: true,
+        age: true,
+        minimum_age: 0,
+        health_score: {
+            avg_nonnew_participators: 0,
+            avg_nonnew_communicators: 0,
+            num_intentful_joiners: 0,
+            perc_ret_w1_intentful: 0
+        },
+        minimum_size: 0
+	});
+});
+
+export default router;