diff --git a/package.json b/package.json index 2a3539e..1fd75ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "that-api-sessions", - "version": "4.3.0", + "version": "4.4.0", "description": "THAT Conference Sessions Service.", "main": "index.js", "engines": { diff --git a/src/events/user.js b/src/events/user.js index 69ed8ab..e9d00d7 100644 --- a/src/events/user.js +++ b/src/events/user.js @@ -400,12 +400,6 @@ function userEvents(postmark) { userEventEmitter.on('sessionUpdated', setOgImage); userEventEmitter.on('sessionUpdated', sendOrbitLoveActivtyOnUpdate); userEventEmitter.on('sessionCancelled', cancelSharedCalendar); - // on admin events - userEventEmitter.on('adminSessionCreated', insertSharedCalendar); - userEventEmitter.on('adminSessionCreated', setOgImage); - userEventEmitter.on('adminSessionUpdated', updateSharedCalendar); - userEventEmitter.on('adminSessionUpdated', setOgImage); - userEventEmitter.on('adminSessionCancelled', cancelSharedCalendar); return userEventEmitter; } diff --git a/src/graphql/resolvers/mutations/adminSessionCreate.js b/src/graphql/resolvers/mutations/adminSessionCreate.js index 5445efb..862d269 100644 --- a/src/graphql/resolvers/mutations/adminSessionCreate.js +++ b/src/graphql/resolvers/mutations/adminSessionCreate.js @@ -26,7 +26,7 @@ function sendUserEvent({ sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }) { if ( @@ -34,7 +34,7 @@ function sendUserEvent({ sessionResults.status === 'ACCEPTED') && sessionResults.startTime ) { - userEvents.emit('adminSessionCreated', { + adminEvents.emit('sessionCreated', { user: { ...user, ...userResults, @@ -62,7 +62,7 @@ export const fieldResolvers = { { dataSources: { firestore, - events: { userEvents, graphCdnEvents }, + events: { adminEvents, graphCdnEvents }, }, user, }, @@ -79,7 +79,7 @@ export const fieldResolvers = { sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }); sendGraphCdnEvent({ graphCdnEvents, sessionResults }); @@ -92,7 +92,7 @@ export const fieldResolvers = { { dataSources: { firestore, - events: { userEvents, graphCdnEvents }, + events: { adminEvents, graphCdnEvents }, }, user, }, @@ -109,7 +109,7 @@ export const fieldResolvers = { sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }); sendGraphCdnEvent({ graphCdnEvents, sessionResults }); @@ -122,7 +122,7 @@ export const fieldResolvers = { { dataSources: { firestore, - events: { userEvents, graphCdnEvents }, + events: { adminEvents, graphCdnEvents }, }, user, }, @@ -139,7 +139,7 @@ export const fieldResolvers = { sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }); sendGraphCdnEvent({ graphCdnEvents, sessionResults }); @@ -152,7 +152,7 @@ export const fieldResolvers = { { dataSources: { firestore, - events: { userEvents, graphCdnEvents }, + events: { adminEvents, graphCdnEvents }, }, user, }, @@ -169,7 +169,7 @@ export const fieldResolvers = { sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }); sendGraphCdnEvent({ graphCdnEvents, sessionResults }); @@ -182,7 +182,7 @@ export const fieldResolvers = { { dataSources: { firestore, - events: { userEvents, graphCdnEvents }, + events: { adminEvents, graphCdnEvents }, }, user, }, @@ -199,7 +199,7 @@ export const fieldResolvers = { sessionResults, userResults, eventResults, - userEvents, + adminEvents, user, }); sendGraphCdnEvent({ graphCdnEvents, sessionResults });