Skip to content

Commit 0630f10

Browse files
Adding current flag to invitations
1 parent f543c2e commit 0630f10

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/BreakoutApi.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ class BreakoutApi {
175175
const teams = await Promise.all(invitations.map(invite => this.getTeamById(invite.team)));
176176

177177
return invitations.map(invitation => {
178-
invitation.team = teams.filter(team => (team.id === invitation.team))[0];
178+
const team = teams.filter(team => (team.id === invitation.team))[0];
179+
const event = events.filter(event => event.id === team.event)[0];
180+
invitation.team = team
181+
invitation.current = event.current;
179182
return invitation;
180183
});
181184
}
@@ -533,6 +536,14 @@ class BreakoutApi {
533536
return this.instance.post(`/event/${eventId}/whitelistDomain/`, {domain: domain}).then(resp => resp.data);
534537
}
535538

539+
createEvent(event) {
540+
return this.instance.post('/event/', event).then(resp => resp.data);
541+
}
542+
543+
updateEvent(event) {
544+
return this.instance.put(`/event/${event.id}/`, event).then(resp => resp.data);
545+
}
546+
536547
}
537548

538549
module.exports = BreakoutApi;

0 commit comments

Comments
 (0)