2025-05-10 02:09:06 +02:00
|
|
|
/*!
|
|
|
|
* Copyright (c) 2024 PLANKA Software GmbH
|
|
|
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
|
|
|
*/
|
2022-12-26 21:10:50 +01:00
|
|
|
|
2021-06-24 01:05:22 +05:00
|
|
|
module.exports = {
|
|
|
|
inputs: {
|
2025-05-10 02:09:06 +02:00
|
|
|
id: {
|
|
|
|
type: 'string',
|
2021-06-24 01:05:22 +05:00
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
async fn(inputs) {
|
2025-05-10 02:09:06 +02:00
|
|
|
const cardLabels = await CardLabel.qm.getByCardId(inputs.id);
|
|
|
|
const labelIds = sails.helpers.utils.mapRecords(cardLabels, 'labelId');
|
2021-06-24 01:05:22 +05:00
|
|
|
|
2025-05-10 02:09:06 +02:00
|
|
|
return Label.qm.getByIds(labelIds);
|
2021-06-24 01:05:22 +05:00
|
|
|
},
|
|
|
|
};
|