Skip to content

Commit

Permalink
feat(api): add a catch-all route
Browse files Browse the repository at this point in the history
  • Loading branch information
zyachel committed Oct 29, 2023
1 parent 4dffbbc commit 9fdd731
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/api/[...error].ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextApiRequest, NextApiResponse } from 'next';

type ResponseData = { status: false; message: string };

export default async function handler(_: NextApiRequest, res: NextApiResponse<ResponseData>) {
res.status(400).json({ status: false, message: 'Not found' });
}

0 comments on commit 9fdd731

Please sign in to comment.