Forgot some schemas + only generate schemas in util/schemas + add setup script

This commit is contained in:
Madeline
2022-10-24 19:46:33 +11:00
parent 56444d1942
commit a2f5762791
10 changed files with 36 additions and 9373 deletions
+1 -7
View File
@@ -4,6 +4,7 @@ import {
ChannelUpdateEvent,
emitEvent,
ChannelModifySchema,
ChannelReorderSchema,
} from "@fosscord/util";
import { HTTPError } from "lambert-server";
import { route } from "@fosscord/api";
@@ -33,13 +34,6 @@ router.post(
},
);
export type ChannelReorderSchema = {
id: string;
position?: number;
lock_permissions?: boolean;
parent_id?: string;
}[];
router.patch(
"/",
route({ body: "ChannelReorderSchema", permission: "MANAGE_CHANNELS" }),
@@ -9,16 +9,12 @@ import {
Config,
DiscordApiErrors,
RoleModifySchema,
RolePositionUpdateSchema,
} from "@fosscord/util";
import { route } from "@fosscord/api";
const router: Router = Router();
export type RolePositionUpdateSchema = {
id: string;
position: number;
}[];
router.get("/", route({}), async (req: Request, res: Response) => {
const guild_id = req.params.guild_id;