add confirm and reject buttons to adming/booking

This commit is contained in:
Thomas Ruoff
2020-11-02 23:25:00 +01:00
parent 8c252cca2b
commit cb9932240d
2 changed files with 30 additions and 11 deletions

View File

@@ -23,6 +23,9 @@ export default withSession(async function bookingHandler(req, res) {
// FIXME: validate all the things
booking.set(req.body)
await booking.save()
await booking.populate('booker').execPopulate()
res.status(200).json(booking.toJSON())
break
default: