session-sync-auth-site 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "session-sync-auth-site",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "main": "src/index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -244,7 +244,7 @@ const setUpSessionSyncAuthRoutes = ({
244
244
  if(!id) throw "Invalid payload. Item in `payload.usersToDelete` missing `id` key."
245
245
  if(!email) throw "Invalid payload. Item in `payload.usersToDelete` missing `email` key."
246
246
 
247
- const [ user ] = await global.sessionSyncAuthSiteConnection.asyncQuery(
247
+ const [ userRow ] = await global.sessionSyncAuthSiteConnection.asyncQuery(
248
248
  `
249
249
  SELECT email
250
250
  FROM \`${userTableName}\`
@@ -255,8 +255,8 @@ const setUpSessionSyncAuthRoutes = ({
255
255
  },
256
256
  )
257
257
 
258
- if(!user) return // gracefully handle non-existent user
259
- if(user.email !== email) throw "The `id` and `email` passed in do not coorespond."
258
+ if(!userRow) return // gracefully handle non-existent user
259
+ if(userRow.email !== email) throw "The `id` and `email` passed in do not coorespond."
260
260
 
261
261
  if(mergeToUserId && mergeUser) {
262
262
  await mergeUser({