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

Merge branch 'fosscord:master' into master

This commit is contained in:
Featyre 2022-01-24 14:59:34 +00:00 committed by GitHub
commit cf2f04de28
4 changed files with 48 additions and 0 deletions

View File

@ -14,6 +14,10 @@ export interface WebhookCreateSchema {
name: 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
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;