mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
Project managers, board members, auto-update after reconnection, refactoring
This commit is contained in:
15
server/api/helpers/boards/get-member-user-ids.js
Normal file
15
server/api/helpers/boards/get-member-user-ids.js
Normal file
@@ -0,0 +1,15 @@
|
||||
module.exports = {
|
||||
inputs: {
|
||||
idOrIds: {
|
||||
type: 'json',
|
||||
custom: (value) => _.isString(value) || _.every(value, _.isString),
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
async fn(inputs) {
|
||||
const boardMemberships = await sails.helpers.boards.getBoardMemberships(inputs.idOrIds);
|
||||
|
||||
return sails.helpers.utils.mapRecords(boardMemberships, 'userId', _.isArray(inputs.idOrIds));
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user