فهرست منبع

fix calling updateImageUrlCached

yusuketk 5 سال پیش
والد
کامیت
d70ecd7160
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      src/server/models/user.js

+ 3 - 3
src/server/models/user.js

@@ -189,7 +189,7 @@ module.exports = function(crowi) {
 
 
   userSchema.methods.updateIsGravatarEnabled = async function(isGravatarEnabled) {
   userSchema.methods.updateIsGravatarEnabled = async function(isGravatarEnabled) {
     this.isGravatarEnabled = isGravatarEnabled;
     this.isGravatarEnabled = isGravatarEnabled;
-    this.imageUrlCached = await this.updateImageUrlCached();
+    await this.updateImageUrlCached();
     const userData = await this.save();
     const userData = await this.save();
     return userData;
     return userData;
   };
   };
@@ -225,7 +225,7 @@ module.exports = function(crowi) {
 
 
   userSchema.methods.updateImage = async function(attachment) {
   userSchema.methods.updateImage = async function(attachment) {
     this.imageAttachment = attachment;
     this.imageAttachment = attachment;
-    this.imageUrlCached = await this.updateImageUrlCached();
+    await this.updateImageUrlCached();
     return this.save();
     return this.save();
   };
   };
 
 
@@ -241,7 +241,7 @@ module.exports = function(crowi) {
     }
     }
 
 
     this.imageAttachment = undefined;
     this.imageAttachment = undefined;
-    this.imageUrlCached = await this.updateImageUrlCached();
+    this.updateImageUrlCached();
     return this.save();
     return this.save();
   };
   };