mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
19 lines
365 B
JavaScript
19 lines
365 B
JavaScript
module.exports = {
|
|
inputs: {
|
|
criteria: {
|
|
type: 'json',
|
|
custom: (value) => _.isArray(value) || _.isPlainObject(value),
|
|
},
|
|
sort: {
|
|
type: 'json',
|
|
defaultsTo: 'id DESC',
|
|
},
|
|
limit: {
|
|
type: 'number',
|
|
},
|
|
},
|
|
|
|
async fn(inputs) {
|
|
return Card.find(inputs.criteria).sort(inputs.sort).limit(inputs.limit);
|
|
},
|
|
};
|