Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@small-lovely-cat
Copy link

@small-lovely-cat small-lovely-cat commented Jan 21, 2026

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 MIT 许可证进行许可,
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并,

关联信息

Ref: t/-/1489265

变更内容

修复当用户更换OAuth中的用户名时,无法登录的问题。

变更原因

else if errors.Is(txByUsername.Error, gorm.ErrRecordNotFound)

这里条件写错了,应该是找不到ID才创建新用户,而不是找不到Username,然后逻辑就跑到创建新用户里面去了 owo

还有一个error handler好像也有点问题,一起改了 owo

span.SetStatus(codes.Error, txByID.Error.Error())
return nil, txByID.Error

@small-lovely-cat
Copy link
Author

@yyg-max 来看看喵 owo

@yyg-max
Copy link
Collaborator

yyg-max commented Jan 21, 2026

不是这个问题

已经改了好 #145

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