From 24cb979a6be8c2d22709c784202210869347008a Mon Sep 17 00:00:00 2001 From: Brett Slaski Date: Thu, 30 May 2024 09:40:40 -0500 Subject: [PATCH] feat: remove all orbit api calls --- .env.sample | 4 ---- .vscode/settings.json | 2 +- package.json | 2 +- src/events/user.js | 32 -------------------------------- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/.env.sample b/.env.sample index efe7ed8..07e6e17 100644 --- a/.env.sample +++ b/.env.sample @@ -26,10 +26,6 @@ ACTIVE_CAMPAIGN_KEY= # graphCdn GRAPHCDN_TOKEN= -# orbit.love -ORBIT_WS_SLUG= -ORBIT_TOKEN= - # HubSpot HUBSPOT_API=https://api.hubapi.com/ HUBSPOT_TOKEN= diff --git a/.vscode/settings.json b/.vscode/settings.json index 92d8d23..91d6964 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,6 @@ }, "peacock.affectActivityBar": false, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/package.json b/package.json index be868a7..64edb17 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/events/user.js b/src/events/user.js index 7da3881..b9cf84d 100644 --- a/src/events/user.js +++ b/src/events/user.js @@ -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'; @@ -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, @@ -160,9 +131,6 @@ function userEvents(postmark) { onAccountUpdateEnsureNoProfileUnsubscribe, ); - userEventEmitter.on('accountCreated', sendOrbitLoveActivityOnCreate); - userEventEmitter.on('accountUpdated', sendOrbitLoveActivityOnUpdate); - userEventEmitter.on('addNewSharingWith', sendNewShareEmail); return userEventEmitter;