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:
commit
cf2f04de28
@ -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) => {
|
||||
|
20
api/src/routes/guilds/#guild_id/audit-logs.ts
Normal file
20
api/src/routes/guilds/#guild_id/audit-logs.ts
Normal 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;
|
12
api/src/routes/guilds/#guild_id/integrations.ts
Normal file
12
api/src/routes/guilds/#guild_id/integrations.ts
Normal 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;
|
12
api/src/routes/guilds/#guild_id/webhooks.ts
Normal file
12
api/src/routes/guilds/#guild_id/webhooks.ts
Normal 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;
|
Loading…
Reference in New Issue
Block a user