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

Optimize JWT using New() instead of create instance directly #1983

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

huiyifyj
Copy link
Contributor

  • Refactor JWT token generation, use New() function instead of create instance directly.
  • Improve error handling flow in SetUserAuthority, remove else block, to make the code more readable.
  • Remove redundant err != nil judgment.

…directly

- Refactor JWT token generation, use `New()` function instead of create instance directly.
- Improve error handling flow in `SetUserAuthority`, remove else block.
- Remove redundant `err != nil` judgment.

- 重构 JWT token 生成,使用 `New()` 函数代替直接创建实例
- 优化 SetUserAuthority 中的错误处理流程,移除 else 代码块
- 移除多余的 err != nil 判断
@pixelmaxQm pixelmaxQm changed the base branch from main to dev-2.7.9 January 13, 2025 13:26
@pixelmaxQm pixelmaxQm merged commit 4c8127b into flipped-aurora:dev-2.7.9 Jan 13, 2025
8 checks passed
@huiyifyj huiyifyj deleted the jwt-new-and-others branch January 17, 2025 05:37
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