mirror of
https://git.moonleay.net/Websites/liljudd-website.git
synced 2025-07-27 03:32:03 +02:00
Fix: use intergers for discord ids
This commit is contained in:
parent
ffaf8d989e
commit
95fee833a1
9 changed files with 151 additions and 181 deletions
|
@ -3,7 +3,8 @@ import { z } from "zod";
|
|||
|
||||
export const zodId = z
|
||||
.string()
|
||||
.refine((value) => /^\d{7,20}$/.test(value), "Invalid ID supplied");
|
||||
.refine((value) => /^\d{7,20}$/.test(value), "Invalid ID supplied")
|
||||
.transform((value) => parseInt(value));
|
||||
|
||||
export const zodTpMessages = z.object({
|
||||
channelId: zodId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue