GetRecoveryCodesByUserID returns all recovery codes of given user.
(userID int64)
| 63 | |
| 64 | // GetRecoveryCodesByUserID returns all recovery codes of given user. |
| 65 | func GetRecoveryCodesByUserID(userID int64) ([]*TwoFactorRecoveryCode, error) { |
| 66 | recoveryCodes := make([]*TwoFactorRecoveryCode, 0, 10) |
| 67 | return recoveryCodes, x.Where("user_id = ?", userID).Find(&recoveryCodes) |
| 68 | } |
| 69 | |
| 70 | func deleteRecoveryCodesByUserID(e Engine, userID int64) error { |
| 71 | _, err := e.Where("user_id = ?", userID).Delete(new(TwoFactorRecoveryCode)) |
no test coverage detected