File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff 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
538549module . exports = BreakoutApi ;
You can’t perform that action at this time.
0 commit comments