requestRepo/newSecret: fix small bug
This commit is contained in:
parent
961a10915b
commit
7a1448d6f9
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ func (r *RequestRepo) newSecret() (string, error) {
|
||||||
for !errors.Is(err, sql.ErrNoRows) {
|
for !errors.Is(err, sql.ErrNoRows) {
|
||||||
secret = randomString(r.config.Request.SecretLength)
|
secret = randomString(r.config.Request.SecretLength)
|
||||||
_, err = r.FindBySecret(secret)
|
_, err = r.FindBySecret(secret)
|
||||||
if err != nil && errors.Is(err, sql.ErrNoRows) {
|
if err != nil && !errors.Is(err, sql.ErrNoRows) {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue