mirror of
https://github.com/plankanban/planka.git
synced 2025-12-16 01:11:06 +03:00
@@ -7,11 +7,23 @@ module.exports = {
|
||||
custom: idOrIdsValidator,
|
||||
required: true,
|
||||
},
|
||||
exceptLabelIdOrIds: {
|
||||
type: 'json',
|
||||
custom: idOrIdsValidator,
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs) {
|
||||
return sails.helpers.labels.getMany({
|
||||
const criteria = {
|
||||
boardId: inputs.idOrIds,
|
||||
});
|
||||
};
|
||||
|
||||
if (!_.isUndefined(inputs.exceptLabelIdOrIds)) {
|
||||
criteria.id = {
|
||||
'!=': inputs.exceptLabelIdOrIds,
|
||||
};
|
||||
}
|
||||
|
||||
return sails.helpers.labels.getMany(criteria);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user