Skip to content

Commit c004e5e

Browse files
committed
attempt fix
1 parent d4816ae commit c004e5e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pages/api/registration/update.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
9797
}
9898

9999
// No record found, add a new row to the table
100-
res.writeHead(302, { Location: '/' });
101-
return res.status(404).json({ message: 'No record found for this email' });
100+
return res
101+
.writeHead(404, { Location: '/' })
102+
.json({ message: 'No record found for this email' });
102103
} catch (error) {
103104
console.error('Error with /api/registration/update PATCH request:', error);
104105
return res.status(500).json({ message: 'Server Error' });

0 commit comments

Comments
 (0)