fix(update credentials): allow only valid data or empty string
This commit is contained in:
parent
cf71c48f09
commit
5dee6450ec
|
@ -225,10 +225,10 @@ const updateCredentialsSchema = z.object({
|
||||||
locked: z.boolean().optional(),
|
locked: z.boolean().optional(),
|
||||||
bot: z.boolean().optional(),
|
bot: z.boolean().optional(),
|
||||||
discoverable: z.boolean().optional(),
|
discoverable: z.boolean().optional(),
|
||||||
nip05: z.string().email().optional(),
|
nip05: z.union([z.string().email().optional(), z.literal('')]),
|
||||||
pleroma_settings_store: z.unknown().optional(),
|
pleroma_settings_store: z.unknown().optional(),
|
||||||
lud16: z.string().email().optional(),
|
lud16: z.union([z.string().email().optional(), z.literal('')]),
|
||||||
website: z.string().url().optional(),
|
website: z.union([z.string().url().optional(), z.literal('')]),
|
||||||
});
|
});
|
||||||
|
|
||||||
const updateCredentialsController: AppController = async (c) => {
|
const updateCredentialsController: AppController = async (c) => {
|
||||||
|
|
Loading…
Reference in New Issue