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

feat: add inviter and PR manager handling in AuthService #2288

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Pospelove
Copy link
Contributor

@Pospelove Pospelove commented Dec 31, 2024

Important

Adds inviter and PR manager handling in AuthService, integrating them into the login process with new interfaces and methods.

  • New Interfaces:
    • SetInviterRequestBody and SetPrManagerRequestBody for inviter and PR manager request bodies.
    • InstallationData to store optional inviterUserId and prManagerUserId.
  • AuthService Enhancements:
    • Adds postInviter() and postPrManager() methods in authService.ts to send inviter and PR manager data.
    • Integrates postInviter() and postPrManager() in checkLoginState() to execute after successful login.
    • Adds readInstallationDataFromDisk() to read installation data from SkyMP/installation-data.json.
  • Misc:
    • Removes commented-out code related to login and connection error handling in authService.ts.

This description was created by Ellipsis for 0243fb2. It will automatically update as commits are pushed.

@ellipsis-dev ellipsis-dev bot changed the title . feat: add inviter and PR manager handling in AuthService Dec 31, 2024
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 6a77930 in 1 minute and 37 seconds

More details
  • Looked at 181 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skymp5-client/src/services/services/authService.ts:335
  • Draft comment:
    The postPrManager method is using the same API route as postInviter. It should have a different route specific to setting the PR manager.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_UCpSImDCw8KUHiht


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

}

private postPrManager(token: string) {
const route = `/api/users/me/inviter`;
Copy link

Choose a reason for hiding this comment

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

The postPrManager method is using the same API route as postInviter. It should have a different route specific to setting the PR manager.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 0243fb2 in 17 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skymp5-client/src/services/services/authService.ts:254
  • Draft comment:
    The route for postPrManager was corrected from /api/users/me/inviter to /api/users/me/prManager. This change aligns with the intended functionality described in the PR description.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_ctRZrQq8uRt8lidQ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant