Skip to content

Commit

Permalink
chore(migrations): cute default and updateOne
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreCat committed Jan 6, 2025
1 parent 440d06d commit 723adce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions migrations/users/full-gear.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ async function updateUser (user) {

if (count % progressCount === 0) console.warn(`${count} ${user._id}`);

return User.update({ _id: user._id }, { $set: set }).exec();
return User.updateOne({ _id: user._id }, { $set: set }).exec();
}

export default async function processUsers () {
const query = {
migration: { $ne: MIGRATION_NAME },
'auth.local.lowerCaseUsername': 'olson1',
'auth.local.username': 'ExampleHabitican',
};

const fields = {
Expand Down
2 changes: 1 addition & 1 deletion migrations/users/full-stable.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function updateUser (user) {
export default async function processUsers () {
const query = {
migration: { $ne: MIGRATION_NAME },
'auth.local.username': 'SabreTest',
'auth.local.username': 'ExampleHabitican',
};

const fields = {
Expand Down

0 comments on commit 723adce

Please sign in to comment.