fix: pipe json payload into desired schema

This commit is contained in:
P. Reis 2025-02-18 22:29:39 -03:00
parent a2165f0918
commit d055c80abe

View file

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