refactor: use zod

This commit is contained in:
P. Reis 2025-02-18 17:13:16 -03:00
parent 4b49dd0ddf
commit 839aaca179

View file

@ -57,7 +57,7 @@ export const swapNutzapsMiddleware: MiddlewareHandler<
let contentTags: string[][];
try {
contentTags = JSON.parse(decryptedContent); // TODO: use zod
contentTags = z.string().array().array().parse(decryptedContent);
} catch {
return c.json({ error: 'Could not JSON parse the decrypted wallet content.' }, 400);
}