Created
July 14, 2016 18:36
-
-
Save joshgrib/fa50139660c568113c6fdd903fb917c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getEventsForAttendee: (attendeeId) => { | |
if (attendeeId === undefined) return Promise.reject("No attendee id provided"); | |
let clone = JSON.parse(JSON.stringify(eventList)); | |
return Promise.resolve(clone.filter(x => x.attendees.indexOf(attendeeId) >= 0)); | |
}, | |
getEventsForLocation: (locationId) => { | |
if (locationId === undefined) return Promise.reject("No location id provided"); | |
let clone = JSON.parse(JSON.stringify(eventList)); | |
return Promise.resolve(clone.filter(x => x.location == locationId)); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment