mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 09:13:23 +03:00
Initial commit
This commit is contained in:
26
server/api/helpers/delete-list.js
Normal file
26
server/api/helpers/delete-list.js
Normal file
@@ -0,0 +1,26 @@
|
||||
module.exports = {
|
||||
inputs: {
|
||||
record: {
|
||||
type: 'ref',
|
||||
required: true
|
||||
},
|
||||
request: {
|
||||
type: 'ref'
|
||||
}
|
||||
},
|
||||
|
||||
fn: async function(inputs, exits) {
|
||||
const list = await List.archiveOne(inputs.record.id);
|
||||
|
||||
sails.sockets.broadcast(
|
||||
`board:${list.boardId}`,
|
||||
'listDelete',
|
||||
{
|
||||
item: list
|
||||
},
|
||||
inputs.request
|
||||
);
|
||||
|
||||
return exits.success(list);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user