Used the correct error

This commit is contained in:
Tracker-Friendly 2024-06-25 01:44:53 +01:00
parent 54f78cf36e
commit 277c343a1b
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ func main() {
_, err = mem.Exec("INSERT INTO logins (appId, exchangeCode, loginToken, creator, openid, pkce, pkcemethod) VALUES (?, ?, ?, ?, ?, ?, ?)", appId, randomBytes, secret_token, userid, jwt_token, code, codeMethod)
if err != nil {
if errors.Is(err, sqlite3.ErrConstraint) {
if errors.Is(err, sqlite3.ErrConstraintUnique) {
c.String(400, "Only one login is permitted at a time. Please try again later.")
return
} else {