- Add Button Whatsapp Chat

- Fixed 'Ask Info' and 'Book' if the email arrived...
- Added "Settings" table: URL_FACEBOOK, TELEGRAM_SUPPORT, URL_INSTAGRAM, WHATSAPP_CELL, INT_CODE, MAIN_EMAIL, CONTACTS_EMAIL_CELL, CALL_WORKING_DAYS, EVENTS_CAL, MSG_REPLY_AFTER_BOOKING.
-
This commit is contained in:
Paolo Arena
2019-11-05 23:53:39 +01:00
parent 9205468065
commit a54839e128
12 changed files with 107 additions and 47 deletions

View File

@@ -34,7 +34,7 @@ router.post('/', authenticate, (req, res) => {
tools.mylog('crea Booking');
const booking = new Booking(myrec);
const check = tools.checkUserOk(booking.userId, req.user._id);
const check = tools.checkUserOk(booking.userId, req.user._id, res);
if (check.exit) return check.ret;
// console.log('fieldtochange', fieldtochange);
@@ -81,10 +81,12 @@ router.delete('/:id/:notify/:idapp', authenticate, (req, res) => {
return res.status(404).send();
}
if (notify === '1')
if (notify === '1') {
recbooking.booked = false;
sendNotif(res, idapp, req.user, recbooking);
}
tools.mylog('DELETED ', recbooking.descr, recbooking._id);
tools.mylog('DELETED ', recbooking._id);
res.send({ code: server_constants.RIS_CODE_OK, msg: '', id: recbooking._id });