1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

feat: Labels reordering

Closes #289
This commit is contained in:
Maksim Eltyshev 2023-01-09 12:17:06 +01:00
parent d260d2dac0
commit a741e26ccb
33 changed files with 370 additions and 104 deletions

View file

@ -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);
},
};