mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
refactor: use zod
This commit is contained in:
parent
4b49dd0ddf
commit
839aaca179
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ export const swapNutzapsMiddleware: MiddlewareHandler<
|
||||||
|
|
||||||
let contentTags: string[][];
|
let contentTags: string[][];
|
||||||
try {
|
try {
|
||||||
contentTags = JSON.parse(decryptedContent); // TODO: use zod
|
contentTags = z.string().array().array().parse(decryptedContent);
|
||||||
} catch {
|
} catch {
|
||||||
return c.json({ error: 'Could not JSON parse the decrypted wallet content.' }, 400);
|
return c.json({ error: 'Could not JSON parse the decrypted wallet content.' }, 400);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue