propro-utils 1.5.74 → 1.5.76

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.
@@ -105,6 +105,7 @@ const DEFAULT_THEME = {
105
105
  defaultColor: '#ffffff',
106
106
  fontSize: '16px',
107
107
  name: 'Default Theme',
108
+ isDefault: true,
108
109
  };
109
110
 
110
111
  /**
@@ -123,10 +124,10 @@ const checkIfUserExists = async accountId => {
123
124
  const folderSchema = await ServiceManager.getService('FolderSchema');
124
125
  const themeSchema = await ServiceManager.getService('ThemeSchema');
125
126
 
126
- console.log('themeschema', themeSchema);
127
127
  let user = await userSchema
128
128
  .findOne({ accountId })
129
- .populate('userGlobalStyles');
129
+ .populate('userGlobalStyles')
130
+ .populate('theme');
130
131
 
131
132
  if (user) {
132
133
  if (!user.userGlobalStyles) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "propro-utils",
3
- "version": "1.5.74",
3
+ "version": "1.5.76",
4
4
  "description": "Auth middleware for propro-auth",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -45,6 +45,7 @@ const sanitizeUser = user => {
45
45
  sanitized.createdAt = sanitized._doc.createdAt;
46
46
  sanitized.updatedAt = sanitized._doc.updatedAt;
47
47
  sanitized.userGlobalStyles = sanitized._doc.userGlobalStyles;
48
+ sanitized.theme = sanitized._doc.theme;
48
49
 
49
50
  delete sanitized._doc.mapList;
50
51
  delete sanitized._doc.folderList;