fix(api): 🐛 Allow empty website in app creation to fix issue with Traewelling

This commit is contained in:
Jesse Wierzbinski 2024-06-26 15:39:48 -10:00
parent e59c3aa625
commit a93085ae1d
No known key found for this signature in database

View file

@ -32,7 +32,15 @@ export const schemas = {
.url() .url()
.or(z.literal("urn:ietf:wg:oauth:2.0:oob")), .or(z.literal("urn:ietf:wg:oauth:2.0:oob")),
scopes: z.string().min(1).max(200), scopes: z.string().min(1).max(200),
website: z.string().min(0).max(2000).url().optional(), website: z
.string()
.min(0)
.max(2000)
.url()
.optional()
// Allow empty websites because Traewelling decides to give an empty
// value instead of not providing anything at all
.or(z.literal("").transform(() => undefined)),
}), }),
}; };