mirror of
https://github.com/plankanban/planka.git
synced 2025-12-23 09:15:09 +03:00
ref: Remove board types, refactoring
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
const criteriaValidator = (value) => _.isArray(value) || _.isPlainObject(value);
|
||||
|
||||
module.exports = {
|
||||
inputs: {
|
||||
criteria: {
|
||||
type: 'json',
|
||||
custom: (value) => _.isArray(value) || _.isPlainObject(value),
|
||||
},
|
||||
sort: {
|
||||
type: 'json',
|
||||
defaultsTo: 'id DESC',
|
||||
},
|
||||
limit: {
|
||||
type: 'number',
|
||||
custom: criteriaValidator,
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs) {
|
||||
return Card.find(inputs.criteria).sort(inputs.sort).limit(inputs.limit);
|
||||
return Card.find(inputs.criteria).sort('position');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user