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 = {
|
|||
const card = await Card.archiveOne(inputs.record.id);
|
||||
|
||||
if (card) {
|
||||
const { board } = await sails.helpers.lists
|
||||
.getProjectPath(card.listId)
|
||||
.intercept('pathNotFound', () => Errors.LIST_NOT_FOUND);
|
||||
|
||||
sails.sockets.broadcast(
|
||||
`board:${card.boardId}`,
|
||||
'cardDelete',
|
||||
|
@ -33,6 +37,15 @@ module.exports = {
|
|||
if (sails.config.custom.slackBotToken) {
|
||||
buildAndSendSlackMessage(inputs.user, card);
|
||||
}
|
||||
|
||||
await sails.helpers.utils.sendWebhook.with({
|
||||
event: 'CARD_DELETE',
|
||||
data: card,
|
||||
projectId: board.projectId,
|
||||
user: inputs.request.currentUser,
|
||||
card,
|
||||
board,
|
||||
});
|
||||
}
|
||||
|
||||
return card;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue