Fixed column names and the report

This commit is contained in:
Senad Uka
2019-07-07 07:02:42 +02:00
parent 2fcb10522c
commit 1e1c61882f
16 changed files with 455 additions and 115 deletions

View File

@@ -188,8 +188,6 @@ const getUnlockEntryForReservation = (reservation, previousReservation) => {
return new Promise((resolve, reject) => {
const { memberId, resourceId } = reservation;
const attributes = ['memberName', 'event', 'timestamp', 'resourceId'];
const previousReservationEndMoment = previousReservation && previousReservation.end ?
moment.utc(previousReservation.end) : null;
const reservationStartMoment = moment.utc(reservation.start);
@@ -214,7 +212,6 @@ const getUnlockEntryForReservation = (reservation, previousReservation) => {
const order = [['timestamp', 'DESC']];
db.doorLockEvent.findAll({
attributes,
where: filters,
order,
})