fix(api): op-login finish 拒绝审批后被停用或删除的账号

This commit is contained in:
Lemon-miaow committed 2026-09-27 14:00:33 +08:00
1 parent 1124413876
commit 009e81b4cf
5 files changed
+86 -6

No files matched your search

+4
View File
@@ -95,6 +95,7 @@ type fakeRepo struct {
failMarkReauth error
failGetSetting error
failRedeemSetup error
failUserDetail error
// player email OTPs (spec §B2). Keyed by row id; the verify path scans for the
// newest live (user, purpose) just as the PG query does.
otps map[string]*fakeEmailOTP
@@ -1271,6 +1272,9 @@ func (f *fakeRepo) ListUsers(_ context.Context, opts ListUsersOpts) ([]UserView,
}
func (f *fakeRepo) UserDetail(_ context.Context, userID string) (*UserDetail, error) {
if f.failUserDetail != nil {
return nil, f.failUserDetail
}
deletedAt := time.Unix(1_700_000_000, 0)
for _, su := range f.seededUsers {
if su.view.ID == userID {