From 9da8e39dd03932cd9d4269ff7f6823856fa97798 Mon Sep 17 00:00:00 2001 From: CuriousMagpie Date: Fri, 15 Dec 2023 12:32:25 -0500 Subject: [PATCH] feat(script): awards 2024 Habitica birthday robes --- migrations/archive/2024/20240131_habit_birthday.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migrations/archive/2024/20240131_habit_birthday.js b/migrations/archive/2024/20240131_habit_birthday.js index 9b8a6e00ef..8b28c84853 100644 --- a/migrations/archive/2024/20240131_habit_birthday.js +++ b/migrations/archive/2024/20240131_habit_birthday.js @@ -53,14 +53,13 @@ async function updateUser (user) { if (count % progressCount === 0) console.warn(`${count} ${user._id}`); - return await User.update({_id: user._id}, {$inc: inc, $set: set, $push: push}).exec(); + return await User.updateOne({_id: user._id}, {$inc: inc, $set: set, $push: push}).exec(); } export default async function processUsers () { let query = { migration: {$ne: MIGRATION_NAME}, - 'auth.timestamps.loggedin': {$gt: new Date('2023-12-01')}, - 'auth.local.lowerCaseUsername': 'nataliemage', + 'auth.timestamps.loggedin': {$gt: new Date('2023-12-23')}, }; const fields = {