feat(antigravity): 手动刷新令牌时自动恢复 missing_project_id 错误账户状态
- 当手动刷新成功获取到 project_id,且之前错误为 missing_project_id 时,自动清除错误状态 - 后台自动刷新时同样支持状态恢复
This commit is contained in:
@@ -491,6 +491,15 @@ func (r *accountRepository) SetError(ctx context.Context, id int64, errorMsg str
|
||||
return err
|
||||
}
|
||||
|
||||
func (r *accountRepository) ClearError(ctx context.Context, id int64) error {
|
||||
_, err := r.client.Account.Update().
|
||||
Where(dbaccount.IDEQ(id)).
|
||||
SetStatus(service.StatusActive).
|
||||
SetErrorMessage("").
|
||||
Save(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
func (r *accountRepository) AddToGroup(ctx context.Context, accountID, groupID int64, priority int) error {
|
||||
_, err := r.client.AccountGroup.Create().
|
||||
SetAccountID(accountID).
|
||||
|
||||
Reference in New Issue
Block a user