fix allow header for routes

This commit is contained in:
Thomas Ruoff
2020-11-02 22:05:32 +01:00
parent c52e3bf921
commit ecc3715f27
2 changed files with 2 additions and 2 deletions

View File

@@ -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`)
}
})

View File

@@ -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`)
}
}