mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
Initial commit
This commit is contained in:
17
server/api/helpers/get-project-memberships-for-user.js
Normal file
17
server/api/helpers/get-project-memberships-for-user.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = {
|
||||
inputs: {
|
||||
id: {
|
||||
type: 'json',
|
||||
custom: value => _.isInteger(value) || _.isArray(value),
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
fn: async function(inputs, exits) {
|
||||
const projectMemberships = await sails.helpers.getProjectMemberships({
|
||||
userId: inputs.id
|
||||
});
|
||||
|
||||
return exits.success(projectMemberships);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user