(tx *storage.Connection, userID uuid.UUID)
| 121 | } |
| 122 | |
| 123 | func ClearAllOneTimeTokensForUser(tx *storage.Connection, userID uuid.UUID) error { |
| 124 | return tx.Q().Where("user_id = ?", userID).Delete(OneTimeToken{}) |
| 125 | } |
| 126 | |
| 127 | func ClearOneTimeTokenForUser(tx *storage.Connection, userID uuid.UUID, tokenType OneTimeTokenType) error { |
| 128 | if err := tx.Q().Where("token_type = ? and user_id = ?", tokenType, userID).Delete(OneTimeToken{}); err != nil { |