- fix: La partecipazione agli eventi, non viene salvata correttamente e non visualizzava.

This commit is contained in:
Surya Paolo
2024-09-30 14:50:19 +02:00
parent 0973fc8757
commit 0a9e012de0
6 changed files with 58 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ router.post('/', authenticate, (req, res) => {
// console.log('trovato', trovato);
if (trovato) {
return Booking.findOneAndUpdate({ id_bookedevent: id }, { $set: fieldtochange }, {
new: false,
new: true,
upsert: true
}).then((recbooking) => {
// tools.mylog('booking:', booking);
@@ -79,7 +79,7 @@ router.delete('/:id/:notify/:idapp', authenticate, (req, res) => {
const notify = req.params.notify;
const idapp = req.params.idapp;
Booking.deleteOne({_id: id}).then((recbooking) => {
Booking.findOneAndDelete({_id: id}).then((recbooking) => {
if (!recbooking) {
return res.status(404).send();
}