1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

feat: Add notification when user is added to card

This commit is contained in:
Maksim Eltyshev 2025-05-17 01:50:40 +02:00
parent f43785c3d0
commit f6568ce41b
14 changed files with 169 additions and 39 deletions

View file

@ -67,7 +67,13 @@ module.exports = {
throw Errors.NOT_ENOUGH_RIGHTS;
}
const isBoardMember = await sails.helpers.users.isBoardMember(inputs.userId, board.id);
const user = await User.qm.getOneById(inputs.userId);
if (!user) {
throw Errors.USER_NOT_FOUND;
}
const isBoardMember = await sails.helpers.users.isBoardMember(user.id, board.id);
if (!isBoardMember) {
throw Errors.USER_NOT_FOUND;
@ -80,7 +86,7 @@ module.exports = {
list,
values: {
card,
userId: inputs.userId,
user,
},
actorUser: currentUser,
request: this.req,