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/is-user-member-for-project.js

22 lines
376 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
module.exports = {
inputs: {
id: {
type: 'string',
required: true,
2019-08-31 04:07:25 +05:00
},
userId: {
type: 'string',
required: true,
},
2019-08-31 04:07:25 +05:00
},
async fn(inputs, exits) {
2019-08-31 04:07:25 +05:00
const projectMembership = await ProjectMembership.findOne({
projectId: inputs.id,
userId: inputs.userId,
2019-08-31 04:07:25 +05:00
});
return exits.success(!!projectMembership);
},
2019-08-31 04:07:25 +05:00
};