Skip to content

Commit

Permalink
Merge pull request #161 from ThatConference/feat/remove-orbit
Browse files Browse the repository at this point in the history
feat: remove all orbit api calls
  • Loading branch information
brettski authored May 30, 2024
2 parents c5950c3 + 24cb979 commit 12e7704
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 38 deletions.
4 changes: 0 additions & 4 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ ACTIVE_CAMPAIGN_KEY=<key value>
# graphCdn
GRAPHCDN_TOKEN=

# orbit.love
ORBIT_WS_SLUG=
ORBIT_TOKEN=

# HubSpot
HUBSPOT_API=https://api.hubapi.com/
HUBSPOT_TOKEN=<key value>
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
},
"peacock.affectActivityBar": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "that-api-members",
"version": "4.4.0",
"version": "4.5.0",
"description": "THATConference.com members service.",
"main": "index.js",
"engines": {
Expand Down
32 changes: 0 additions & 32 deletions src/events/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { EventEmitter } from 'events';
import * as Sentry from '@sentry/node';
import debug from 'debug';
import moment from 'moment';
import { orbitLove } from '@thatconference/api';
import slackNotifications from '../lib/slackNotifications';
import hsActions from '../lib/hubSpotActions';

Expand Down Expand Up @@ -85,34 +84,6 @@ function userEvents(postmark) {
return hsActions.unsubscribeNoProfileOnboarding(user.email);
}

function sendOrbitLoveActivityOnCreate(user, firestore) {
dlog('sendOrbitLoveActicityOnCreate for %s', user.id);
const orbitLoveApi = orbitLove.orbitLoveApi({ firestore });

return orbitLoveApi
.addProfileActivity({
activityType: orbitLove.activityTypes.profile.update(),
member: user,
})
.catch(err =>
process.nextTick(() => userEventEmitter.emit('error', { err, user })),
);
}

function sendOrbitLoveActivityOnUpdate(user, firestore) {
dlog('sendOrbitLoveActivityOnUpdate for %s', user.id);
const orbitLoveApi = orbitLove.orbitLoveApi({ firestore });

return orbitLoveApi
.addProfileActivity({
activityType: orbitLove.activityTypes.profile.update(),
member: user,
})
.catch(err =>
process.nextTick(() => userEventEmitter.emit('error', { err, user })),
);
}

function sendNewShareEmail({
sharingWith,
sharingSharedProfile,
Expand Down Expand Up @@ -160,9 +131,6 @@ function userEvents(postmark) {
onAccountUpdateEnsureNoProfileUnsubscribe,
);

userEventEmitter.on('accountCreated', sendOrbitLoveActivityOnCreate);
userEventEmitter.on('accountUpdated', sendOrbitLoveActivityOnUpdate);

userEventEmitter.on('addNewSharingWith', sendNewShareEmail);

return userEventEmitter;
Expand Down

0 comments on commit 12e7704

Please sign in to comment.