summary refs log tree commit diff
path: root/src/api/routes/partners/#guild_id/requirements.ts
blob: 7e63c06b8830179192470e824a4cffcb9d683fc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;