Skip to content

Commit e8b7f00

Browse files
committed
[fix] apiのエラー文を修正
1 parent 382088f commit e8b7f00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

view/src/pages/api/parkings/[parkingName].ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
88
const { method } = req
99
const { parkingName } = req.query
1010
if (typeof parkingName !== 'string') throw new Error('parkingName is not string')
11-
if (!isParkingName(parkingName)) throw new Error('parkingName is not valid')
11+
if (!isParkingName(parkingName)) throw new Error('parkingName is not found')
1212

1313
switch (method) {
1414
case 'GET': {
@@ -19,7 +19,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
1919
break
2020
}
2121
default:
22-
res.setHeader('Allow', ['GET', 'PUT'])
22+
res.setHeader('Allow', ['GET'])
2323
if (method) res.status(405).end(`Method ${method} Not Allowed`)
2424
else res.status(405).end(`Method Not Allowed`)
2525
}

0 commit comments

Comments
 (0)