- Cataloghi

- Import ed Export Pagine
- ObjectID sostituita con ObjectId
This commit is contained in:
Surya Paolo
2024-12-17 17:55:47 +01:00
parent 14b3e18986
commit 300bab2125
91 changed files with 404 additions and 272 deletions

View File

@@ -8,7 +8,7 @@ const { authenticate } = require('../middleware/authenticate');
const { Booking } = require('../models/booking');
const { ObjectID } = require('mongodb');
const { ObjectId } = require('mongodb');
const sendemail = require('../sendemail');
@@ -56,7 +56,7 @@ router.post('/', authenticate, (req, res) => {
} else {
// save to database a new record
tools.mylog('save to database a new record');
booking._id = new ObjectID();
booking._id = new ObjectId();
return booking.save().then((writeresult) => {
let idobj = writeresult._id;
@@ -107,7 +107,7 @@ router.delete('/:id/:notify/:idapp', authenticate, (req, res) => {
//
// // tools.mylog('GET BOOKINGS : ', req.params);
//
// if (!ObjectID.isValid(userId)) {
// if (!ObjectId.isValid(userId)) {
// return res.status(404).send();
// }
//