mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-25 04:26:00 -05:00
Add TO permissions via UI
This commit is contained in:
@@ -68,6 +68,12 @@ export const action = async ({ request }: ActionFunctionArgs) => {
|
||||
await AdminRepository.makeVideoAdderByUserId(data.user);
|
||||
break;
|
||||
}
|
||||
case "TOURNAMENT_ORGANIZER": {
|
||||
validate(isMod(user), "Mod needed", 401);
|
||||
|
||||
await AdminRepository.makeTournamentOrganizerByUserId(data.user);
|
||||
break;
|
||||
}
|
||||
case "LINK_PLAYER": {
|
||||
validate(isMod(user), "Mod needed", 401);
|
||||
|
||||
@@ -155,6 +161,10 @@ export const adminActionSchema = z.union([
|
||||
_action: _action("VIDEO_ADDER"),
|
||||
user: z.preprocess(actualNumber, z.number().positive()),
|
||||
}),
|
||||
z.object({
|
||||
_action: _action("TOURNAMENT_ORGANIZER"),
|
||||
user: z.preprocess(actualNumber, z.number().positive()),
|
||||
}),
|
||||
z.object({
|
||||
_action: _action("ARTIST"),
|
||||
user: z.preprocess(actualNumber, z.number().positive()),
|
||||
|
||||
Reference in New Issue
Block a user