mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-19 13:40:41 -05:00
* Update PlusVotingResult * Logic * Replace plus tiers * Testing initial * Test progress * Working one test * Tests * Schema different file * Dynamic test * Fix test util
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { _action, actualNumber } from "~/utils/zod";
|
|
import { z } from "zod";
|
|
|
|
export const adminActionSchema = z.union([
|
|
z.object({
|
|
_action: _action("MIGRATE"),
|
|
"old-user": z.preprocess(actualNumber, z.number().positive()),
|
|
"new-user": z.preprocess(actualNumber, z.number().positive()),
|
|
}),
|
|
z.object({
|
|
_action: _action("REFRESH"),
|
|
}),
|
|
z.object({
|
|
_action: _action("CLEAN_UP"),
|
|
}),
|
|
z.object({
|
|
_action: _action("FORCE_PATRON"),
|
|
user: z.preprocess(actualNumber, z.number().positive()),
|
|
patronTier: z.preprocess(actualNumber, z.number()),
|
|
patronTill: z.string(),
|
|
}),
|
|
z.object({
|
|
_action: _action("VIDEO_ADDER"),
|
|
user: z.preprocess(actualNumber, z.number().positive()),
|
|
}),
|
|
z.object({
|
|
_action: _action("ARTIST"),
|
|
user: z.preprocess(actualNumber, z.number().positive()),
|
|
}),
|
|
z.object({
|
|
_action: _action("LINK_PLAYER"),
|
|
user: z.preprocess(actualNumber, z.number().positive()),
|
|
playerId: z.preprocess(actualNumber, z.number().positive()),
|
|
}),
|
|
]);
|