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

refactor: use system admin word correctly #782

Merged
merged 1 commit into from
Feb 2, 2024
Merged

refactor: use system admin word correctly #782

merged 1 commit into from
Feb 2, 2024

Conversation

kentakozuka
Copy link
Contributor

@kentakozuka kentakozuka commented Feb 2, 2024

This pull request primarily focuses on renaming the error ErrAdminAccountNotFound to ErrSystemAdminAccountNotFound and updating the associated SQL query in the pkg/account package. The changes ensure that the correct error and SQL query are used when retrieving a system admin account.

Here are the key changes:

  • pkg/account/storage/v2/admin_account.go: Renamed the error ErrAdminAccountNotFound to ErrSystemAdminAccountNotFound and updated the SQL query from selectAdminAccountV2SQL to selectSystemAdminAccountV2SQL. This change affects the GetSystemAdminAccountV2 method where the new error is returned when the system admin account is not found. [1] [2]

  • pkg/account/api/admin_account.go: Updated the getSystemAdminAccountV2 method in the AccountService to check for the new error ErrSystemAdminAccountNotFound instead of the old error.

  • pkg/account/api/admin_account_test.go and pkg/account/storage/v2/admin_account_test.go: Updated the test cases to expect the new error ErrSystemAdminAccountNotFound instead of the old error. [1] [2]

Copy link
Member

@cre8ivejp cre8ivejp left a comment

Choose a reason for hiding this comment

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

Thanks!
It would be better to give another commit message because you already merged one using the same message.

E.g.

refactor: renaming error messages in the account for easier understanding
or
refactor: adding prefix `system` for easier understanding

@kentakozuka kentakozuka merged commit 51bcddd into main Feb 2, 2024
@kentakozuka kentakozuka deleted the idtoken branch February 2, 2024 07:29
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.

2 participants