Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Veteran Pet ladder award for users affected by username changes #10765

Merged
merged 3 commits into from Oct 23, 2018

Conversation

SabreCat
Copy link
Member

@SabreCat SabreCat commented Oct 17, 2018

Fixes https://github.com/HabitRPG/habitica-private/issues/22

Changes

  • Adds a new veteran pet to the awards ladder, the Veteran Fox.
  • Adds a migration to award the next Veteran Pet on the ladder to users who have already verified their usernames.
  • Awards the next Veteran Pet on the ladder to users who verify their usernames if not already verified.
  • Awards the first Veteran Pet on the ladder to newly registering users.

Concerns

  • The migration uses the same batching template we've relied on in the past, but updated to use the Mongoose model instead of monk. It deserves extra scrutiny for this first such use case.

Copy link
Contributor

@paglias paglias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left just one comment


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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super important but here you should be able to use 'user.update()' directly as we have an User instance

@SabreCat SabreCat changed the base branch from develop to release October 23, 2018 22:15
@SabreCat SabreCat merged commit 2fc1f46 into release Oct 23, 2018
@SabreCat SabreCat deleted the sabrecat/veteran-verified branch October 23, 2018 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants