Skip to content

Commit

Permalink
🐛 DB ref is saved as event id into the store
Browse files Browse the repository at this point in the history
Fixes#12
  • Loading branch information
valenber committed Aug 21, 2020
1 parent a969756 commit 820621f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion data/databaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ async function getAllAgendaEvents(): Promise<AgendaEvent[]> {

interface FdbEvent {
data: AgendaEvent;
ref: string;
}

return data.map((event: FdbEvent) => event.data);
return data.map((event: FdbEvent) => ({
...event.data,
id: extractRefString(event.ref),
}));
}

async function createNewAgendaEvent(
Expand Down

0 comments on commit 820621f

Please sign in to comment.