Files
planka/server/api/helpers/get-cards-for-board.js
2020-04-03 00:35:25 +05:00

18 lines
313 B
JavaScript

module.exports = {
inputs: {
id: {
type: 'json',
custom: (value) => _.isString(value) || _.isArray(value),
required: true,
},
},
async fn(inputs, exits) {
const cards = await sails.helpers.getCards({
boardId: inputs.id,
});
return exits.success(cards);
},
};