mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
Add covers for cards
This commit is contained in:
parent
6a68ec9c1e
commit
49dc28b0d7
26 changed files with 315 additions and 98 deletions
|
@ -42,14 +42,19 @@ module.exports = {
|
|||
required: true,
|
||||
columnName: 'card_id',
|
||||
},
|
||||
userId: {
|
||||
model: 'User',
|
||||
required: true,
|
||||
columnName: 'user_id',
|
||||
},
|
||||
},
|
||||
|
||||
customToJSON() {
|
||||
return {
|
||||
..._.omit(this, ['dirname', 'filename', 'isImage']),
|
||||
url: `${sails.config.custom.attachmentsUrl}/${this.dirname}/${this.filename}`,
|
||||
thumbnailUrl: this.isImage
|
||||
? `${sails.config.custom.attachmentsUrl}/${this.dirname}/240.jpg`
|
||||
coverUrl: this.isImage
|
||||
? `${sails.config.custom.attachmentsUrl}/${this.dirname}/thumbnails/cover-256.jpg`
|
||||
: null,
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue