mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
shared-code-user-score-task
This commit is contained in:
@@ -54,6 +54,13 @@ export async function generateReward (update = {}) {
|
||||
return task;
|
||||
}
|
||||
|
||||
export async function generateTodo (update = {}) {
|
||||
let type = 'todo';
|
||||
let task = new Tasks[type](update);
|
||||
await task.save({ validateBeforeSave: false });
|
||||
return task;
|
||||
}
|
||||
|
||||
// Generates a new group. Requires a user object, which
|
||||
// will will become the groups leader. Takes a details argument
|
||||
// for the initial group creation and an update argument which
|
||||
|
||||
Reference in New Issue
Block a user