use servemux *properly* this time; better error handling for DB gets

This commit is contained in:
ari melody 2025-11-08 15:04:07 +00:00
parent a33e6717e0
commit b7c1d85830
Signed by: ari
GPG key ID: CF99829C92678188
16 changed files with 234 additions and 288 deletions

View file

@ -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
}