preparations for styling: refactor template rendering #1
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