You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
652 B
JavaScript
37 lines
652 B
JavaScript
module.exports = {
|
|
inputs: {
|
|
record: {
|
|
type: 'ref',
|
|
required: true,
|
|
},
|
|
request: {
|
|
type: 'ref',
|
|
},
|
|
},
|
|
|
|
async fn(inputs) {
|
|
const list = await List.archiveOne(inputs.record.id);
|
|
|
|
if (list) {
|
|
sails.sockets.broadcast(
|
|
`board:${list.boardId}`,
|
|
'listDelete',
|
|
{
|
|
item: list,
|
|
},
|
|
inputs.request,
|
|
);
|
|
|
|
await sails.helpers.utils.sendWebhook.with({
|
|
event: 'LIST_DELETE',
|
|
data: list,
|
|
projectId: list.board.projectId,
|
|
user: inputs.request.currentUser,
|
|
board: list.board,
|
|
});
|
|
}
|
|
|
|
return list;
|
|
},
|
|
};
|