Skip to content

Commit

Permalink
Fixing the image url
Browse files Browse the repository at this point in the history
  • Loading branch information
salahawad committed Nov 8, 2021
1 parent e5f4d84 commit 333fe35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/models/Company.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ schema.methods.compareRowPassword = function (password, callback) {
schema.virtual("fullpicture").get(function () {
let fullpicture = "";
if (this.picture.length > 2) {
fullpicture = _config("app.imageurl") + this.picture;
fullpicture = `/upload/${this.picture}`;
}
return fullpicture;
});

schema.virtual("fullcover").get(function () {
let fullcover = "";
if (this.cover.length > 2) {
fullcover = _config("app.imageurl") + this.cover;
fullcover = `/upload/${this.cover}`;
}
return fullcover;
});
Expand Down
6 changes: 3 additions & 3 deletions app/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,22 +229,22 @@ schema.methods.compareRowPassword = function (password, callback) {
schema.virtual("fullpicture").get(function () {
let fullpicture = "";
if (this.picture && this.picture.length > 2) {
fullpicture = _config("app.imageurl") + this.picture;
fullpicture = `/upload/${this.picture}`;
}
return fullpicture;
});
schema.virtual("fullcover").get(function () {
let fullcover = "";
if (this.cover && this.cover.length > 2) {
fullcover = _config("app.imageurl") + this.cover;
fullcover = `/upload/${this.cover}`;
}
return fullcover;
});

schema.virtual("fullcv").get(function () {
let fullcv = "";
if (this.cv && this.cv.length > 2) {
fullcv = _config("app.imageurl") + this.cv;
fullcv = `/upload/${this.cv}`;
}
return fullcv;
});
Expand Down

0 comments on commit 333fe35

Please sign in to comment.