1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Add dummy endpoints to prevent client loading some settings panels indefinitely

This commit is contained in:
TheArcaneBrony 2022-01-24 15:22:09 +01:00 committed by Erkin Alp Güney
parent 82ad769dff
commit cc1d7f9cc0
4 changed files with 48 additions and 0 deletions

View File

@ -14,6 +14,10 @@ export interface WebhookCreateSchema {
name: string; name: string;
avatar: string; avatar: string;
} }
//TODO: implement webhooks
router.get("/", route({}), async (req: Request, res: Response) => {
res.json([]);
});
// TODO: use Image Data Type for avatar instead of String // TODO: use Image Data Type for avatar instead of String
router.post("/", route({ body: "WebhookCreateSchema", permission: "MANAGE_WEBHOOKS" }), async (req: Request, res: Response) => { router.post("/", route({ body: "WebhookCreateSchema", permission: "MANAGE_WEBHOOKS" }), async (req: Request, res: Response) => {

View File

@ -0,0 +1,20 @@
import { Router, Response, Request } from "express";
import { Channel, ChannelUpdateEvent, getPermission, emitEvent } from "@fosscord/util";
import { HTTPError } from "lambert-server";
import { route } from "@fosscord/api";
import { ChannelModifySchema } from "../../channels/#channel_id";
const router = Router();
//TODO: implement audit logs
router.get("/", route({}), async (req: Request, res: Response) => {
res.json({
audit_log_entries: [],
users: [],
integrations: [],
webhooks: [],
guild_scheduled_events: [],
threads: [],
application_commands: []
});
});
export default router;

View File

@ -0,0 +1,12 @@
import { Router, Response, Request } from "express";
import { Channel, ChannelUpdateEvent, getPermission, emitEvent } from "@fosscord/util";
import { HTTPError } from "lambert-server";
import { route } from "@fosscord/api";
import { ChannelModifySchema } from "../../channels/#channel_id";
const router = Router();
//TODO: implement integrations list
router.get("/", route({}), async (req: Request, res: Response) => {
res.json([]);
});
export default router;

View File

@ -0,0 +1,12 @@
import { Router, Response, Request } from "express";
import { Channel, ChannelUpdateEvent, getPermission, emitEvent } from "@fosscord/util";
import { HTTPError } from "lambert-server";
import { route } from "@fosscord/api";
import { ChannelModifySchema } from "../../channels/#channel_id";
const router = Router();
//TODO: implement webhooks
router.get("/", route({}), async (req: Request, res: Response) => {
res.json([]);
});
export default router;