propro-utils 1.4.44 → 1.4.46

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": "propro-utils",
3
- "version": "1.4.44",
3
+ "version": "1.4.46",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -89,7 +89,7 @@ function proproAuthMiddleware(options = {}, userSchema) {
89
89
  console.error('an error occur: ', error.message);
90
90
  }
91
91
 
92
- const { account, access, refresh } = response.data;
92
+ let { account, access, refresh } = response.data;
93
93
 
94
94
  if (!account || !access || !refresh) {
95
95
  return res
@@ -121,6 +121,7 @@ function proproAuthMiddleware(options = {}, userSchema) {
121
121
  );
122
122
 
123
123
  const user = await checkIfUserExists(userSchema, account.accountId);
124
+ console.log('user: ', user);
124
125
 
125
126
  setAuthCookies(res, tokens, account, user);
126
127