feat(api): add a catch-all route
This commit is contained in:
parent
4dffbbc0ec
commit
9fdd731136
1 changed files with 7 additions and 0 deletions
7
src/pages/api/[...error].ts
Normal file
7
src/pages/api/[...error].ts
Normal file
|
@ -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' });
|
||||
}
|
Loading…
Reference in a new issue