@@ -36,11 +36,16 @@ type Querier interface { |
| 36 | 36 | GetUserEmailByAddress(ctx context.Context, db DBTX, email string) (UserEmail, error) |
| 37 | 37 | GetUserEmailByID(ctx context.Context, db DBTX, id int64) (UserEmail, error) |
| 38 | 38 | GetUserEmailByVerificationHash(ctx context.Context, db DBTX, verificationTokenHash []byte) (UserEmail, error) |
| 39 | + // Sets the FK only. Does NOT flip users.email_verified — that happens via |
| 40 | + // MarkUserEmailPrimaryVerified after the user clicks the verification link. |
| 41 | + LinkUserPrimaryEmail(ctx context.Context, db DBTX, arg LinkUserPrimaryEmailParams) error |
| 39 | 42 | ListUserEmailsForUser(ctx context.Context, db DBTX, userID int64) ([]UserEmail, error) |
| 43 | + // Called after MarkUserEmailVerified for the primary email, to flip the |
| 44 | + // denormalized users.email_verified flag. |
| 45 | + MarkUserEmailPrimaryVerified(ctx context.Context, db DBTX, id int64) error |
| 40 | 46 | MarkUserEmailVerified(ctx context.Context, db DBTX, id int64) error |
| 41 | 47 | PurgeStaleAuthThrottle(ctx context.Context, db DBTX, windowStartedAt pgtype.Timestamptz) error |
| 42 | 48 | ResetAuthThrottle(ctx context.Context, db DBTX, arg ResetAuthThrottleParams) error |
| 43 | | - SetUserPrimaryEmail(ctx context.Context, db DBTX, arg SetUserPrimaryEmailParams) error |
| 44 | 49 | SetVerificationToken(ctx context.Context, db DBTX, arg SetVerificationTokenParams) error |
| 45 | 50 | SoftDeleteUser(ctx context.Context, db DBTX, id int64) error |
| 46 | 51 | SuspendUser(ctx context.Context, db DBTX, arg SuspendUserParams) error |