Skip to content

Commit

Permalink
login-account-proxy: Remove error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg committed May 20, 2024
1 parent 5537a07 commit 9e78233
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apps/login-account-proxy/src/pages/api/public/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ export default apiRoute(async (
req: NextApiRequest,
res: NextApiResponse,
) => {
// TODO: better schema validation
const data = (typeof req.body === 'string' ? JSON.parse(req.body) : req.body) as SubmitRequest;
if (typeof data.newEmail !== 'string' || typeof data.password !== 'string' || typeof data.secret !== 'string') {
console.error(`Invalid payload: ${JSON.stringify(req.body)}`);
res.status(400).send({ type: 'error', message: 'Invalid payload' });
return;
}
Expand Down

0 comments on commit 9e78233

Please sign in to comment.