mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: json 404 response in api endpoint
This commit is contained in:
parent
8a80f6c832
commit
563301e340
8
pages/api/[...404].ts
Normal file
8
pages/api/[...404].ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next'
|
||||||
|
|
||||||
|
const HelloWorld:NextApiHandler = (_req: NextApiRequest, res: NextApiResponse) =>{
|
||||||
|
res.statusCode = 404
|
||||||
|
res.json({ code: 404, message: '요청하신 URL에 페이지가 존재하지 않습니다.' })
|
||||||
|
}
|
||||||
|
|
||||||
|
export default HelloWorld
|
||||||
Loading…
x
Reference in New Issue
Block a user