for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
export default class EventPollRepository {
constructor () {
this.storage = {}
}
findById (id) {
return this.storage[id]
save (eventPoll) {
this.storage[eventPoll.id] = eventPoll
all () {
return new Promise((resolve) => {
resolve(Object.keys(this.storage).map(eventPollId => this.storage[eventPollId]))
})