mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
feat(teams): add FAQ entry
Also a few client side fixes
This commit is contained in:
@@ -370,6 +370,21 @@ api.taskNeedsWork = {
|
||||
if (canNotEditTasks(group, user)) throw new NotAuthorized(res.t('onlyGroupLeaderCanEditTasks'));
|
||||
|
||||
await scoreTasks(assignedUser, [{ id: task._id, direction: 'down' }], req, res);
|
||||
assignedUser.addNotification('GROUP_TASK_NEEDS_WORK', {
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.profile.name }, assignedUser.preferences.language),
|
||||
task: {
|
||||
id: task._id,
|
||||
text: task.text,
|
||||
},
|
||||
group: {
|
||||
id: group._id,
|
||||
name: group.name,
|
||||
},
|
||||
manager: {
|
||||
id: user._id,
|
||||
name: user.profile.name,
|
||||
},
|
||||
});
|
||||
await Promise.all([assignedUser.save(), task.save()]);
|
||||
|
||||
res.respond(200, task);
|
||||
|
||||
Reference in New Issue
Block a user