mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
Moved approval fields to group subdoc
This commit is contained in:
@@ -51,6 +51,10 @@ export async function createTasks (req, res, options = {}) {
|
||||
let taskType = taskData.type;
|
||||
let newTask = new Tasks[taskType](Tasks.Task.sanitize(taskData));
|
||||
|
||||
if (taskData.requiresApproval) {
|
||||
newTask.group.requiresApproval = true;
|
||||
}
|
||||
|
||||
if (challenge) {
|
||||
newTask.challenge.id = challenge.id;
|
||||
} else if (group) {
|
||||
|
||||
Reference in New Issue
Block a user