mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 09:13:23 +03:00
Initial commit
This commit is contained in:
19
server/api/helpers/get-actions.js
Normal file
19
server/api/helpers/get-actions.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
inputs: {
|
||||
criteria: {
|
||||
type: 'json',
|
||||
custom: value => _.isArray(value) || _.isPlainObject(value)
|
||||
},
|
||||
limit: {
|
||||
type: 'number'
|
||||
}
|
||||
},
|
||||
|
||||
fn: async function(inputs, exits) {
|
||||
const actions = await Action.find(inputs.criteria)
|
||||
.sort('id DESC')
|
||||
.limit(inputs.limit);
|
||||
|
||||
return exits.success(actions);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user