mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
parent
c0b694039e
commit
193daf6cfb
38 changed files with 416 additions and 9 deletions
|
@ -21,6 +21,10 @@ module.exports = {
|
|||
custom: valuesValidator,
|
||||
required: true,
|
||||
},
|
||||
board: {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
requestId: {
|
||||
type: 'string',
|
||||
isNotEmptyString: true,
|
||||
|
@ -31,7 +35,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
async fn(inputs) {
|
||||
const { values } = inputs;
|
||||
const { values, board } = inputs;
|
||||
|
||||
const attachment = await Attachment.create({
|
||||
...values,
|
||||
|
@ -55,9 +59,20 @@ module.exports = {
|
|||
values: {
|
||||
coverAttachmentId: attachment.id,
|
||||
},
|
||||
board,
|
||||
request: inputs.request,
|
||||
});
|
||||
}
|
||||
|
||||
await sails.helpers.utils.sendWebhook.with({
|
||||
event: 'ATTACHMENT_CREATE',
|
||||
data: attachment,
|
||||
projectId: board.projectId,
|
||||
user: inputs.request.currentUser,
|
||||
card: values.card,
|
||||
board,
|
||||
});
|
||||
|
||||
return attachment;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue