propro-utils 1.5.56 → 1.5.58

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.
@@ -152,7 +152,10 @@ const checkIfUserExists = async accountId => {
152
152
  return user;
153
153
  }
154
154
 
155
- const userGlobalStyles = await createUserGlobalStyles(userStyleSchema);
155
+ const userGlobalStyles = await createUserGlobalStyles(
156
+ userStyleSchema,
157
+ accountId
158
+ );
156
159
 
157
160
  user = await userSchema.create({
158
161
  accountId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-utils",
3
- "version": "1.5.56",
3
+ "version": "1.5.58",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -210,7 +210,8 @@ class AuthMiddleware {
210
210
  const refreshToken =
211
211
  req.cookies['x-refresh-token'] || req.headers['x-refresh-token'];
212
212
  if (!refreshToken) {
213
- return res.status(401).json({ error: 'No refresh token provided' });
213
+ clearAuthCookies(res);
214
+ return this.handleAuth(req, res);
214
215
  }
215
216
 
216
217
  try {