1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00
planka/server/api/helpers/get-cards.js
2020-04-03 00:35:25 +05:00

14 lines
288 B
JavaScript

module.exports = {
inputs: {
criteria: {
type: 'json',
custom: (value) => _.isArray(value) || _.isPlainObject(value),
},
},
async fn(inputs, exits) {
const cards = await Card.find(inputs.criteria).sort('position');
return exits.success(cards);
},
};