kaori 4 лет назад
Родитель
Сommit
ac9375d4bf
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      packages/app/src/server/models/user.js

+ 4 - 4
packages/app/src/server/models/user.js

@@ -35,7 +35,7 @@ module.exports = function(crowi) {
     userEvent.on('activated', userEvent.onActivated);
     userEvent.on('activated', userEvent.onActivated);
   }
   }
 
 
-  const editorSchema = new mongoose.Schema({
+  const defaultSettingsForNewPageSchema = new mongoose.Schema({
     isTextLintEnable: { type: Boolean, default: true },
     isTextLintEnable: { type: Boolean, default: true },
   });
   });
 
 
@@ -70,7 +70,7 @@ module.exports = function(crowi) {
     lastLoginAt: { type: Date },
     lastLoginAt: { type: Date },
     admin: { type: Boolean, default: 0, index: true },
     admin: { type: Boolean, default: 0, index: true },
     isInvitationEmailSended: { type: Boolean, default: false },
     isInvitationEmailSended: { type: Boolean, default: false },
-    editorSettings: editorSchema,
+    defaultSettingsForNewPage: defaultSettingsForNewPageSchema,
   }, {
   }, {
     toObject: {
     toObject: {
       transform: (doc, ret, opt) => {
       transform: (doc, ret, opt) => {
@@ -698,8 +698,8 @@ module.exports = function(crowi) {
     user.save();
     user.save();
   };
   };
 
 
-  userSchema.methods.updateEditorSettings = async function(editorSettings) {
-    this.editorSettings = editorSettings;
+  userSchema.methods.updatedefaultSettingsForNewPage = async function(defaultSettingsForNewPage) {
+    this.defaultSettingsForNewPage = defaultSettingsForNewPage;
     const userData = await this.save();
     const userData = await this.save();
     return userData;
     return userData;
   };
   };