Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove all orbit api calls #161

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading