use servemux *properly* this time; better error handling for DB gets
This commit is contained in:
parent
a33e6717e0
commit
b7c1d85830
16 changed files with 234 additions and 288 deletions
|
|
@ -121,9 +121,7 @@ func GetTOTP(db *sqlx.DB, accountID string, name string) (*model.TOTP, error) {
|
|||
name,
|
||||
)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "no rows") {
|
||||
return nil, nil
|
||||
}
|
||||
if strings.Contains(err.Error(), "no rows") { return nil, nil }
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue