1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 21:29:43 +02:00
planka/server/api/helpers/get-project-memberships.js
2020-04-03 00:35:25 +05:00

14 lines
321 B
JavaScript

module.exports = {
inputs: {
criteria: {
type: 'json',
custom: (value) => _.isArray(value) || _.isPlainObject(value),
},
},
async fn(inputs, exits) {
const projectMemberships = await ProjectMembership.find(inputs.criteria).sort('id');
return exits.success(projectMemberships);
},
};