mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix allow header for routes
This commit is contained in:
@@ -39,7 +39,7 @@ export default withSession(async function billHandler(req, res) {
|
||||
}
|
||||
break
|
||||
default:
|
||||
res.setHeader('Allow', ['POST'])
|
||||
res.setHeader('Allow', ['POST', 'PATCH'])
|
||||
res.status(405).end(`Method ${method} Not Allowed`)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@ export default async function userHandler(
|
||||
res.status(200).json(booking.toJSON())
|
||||
break
|
||||
default:
|
||||
res.setHeader('Allow', ['POST'])
|
||||
res.setHeader('Allow', ['PATCH'])
|
||||
res.status(405).end(`Method ${method} Not Allowed`)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user