Skip to content

Conversation

@PriyamAgrawal
Copy link
Collaborator

No description provided.

@PriyamAgrawal PriyamAgrawal requested a review from rsarky January 27, 2019 11:44
var filename = path.join(__dirname, `events-${date}.pdf`)
console.log(date)
var eventsRef = admin.database().ref('to-be-held/' + date)
var eventRef = admin.database().ref()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventRef is a misleading variable name in this case. Something like firebaseDB would be more appropriate.

// console.log("No events Booked for this day")
// }
var html
var eventID = snapshotToArray(snapshot)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could check the length of the array and respond if it is 0 here itself instead of using the counter i.

eventObj.push(roomlist)
eventarr.push(eventObj)
}
i++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try not to use the counter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants