mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 01:11:13 +03:00
Add file attachments
This commit is contained in:
14
server/api/helpers/get-attachments.js
Normal file
14
server/api/helpers/get-attachments.js
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
inputs: {
|
||||
criteria: {
|
||||
type: 'json',
|
||||
custom: (value) => _.isArray(value) || _.isPlainObject(value),
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs, exits) {
|
||||
const attachments = await Attachment.find(inputs.criteria).sort('id');
|
||||
|
||||
return exits.success(attachments);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user