Forgot some schemas + only generate schemas in util/schemas + add setup script
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user