From edccb95be3059ef46e35859263aae691fd08c844 Mon Sep 17 00:00:00 2001 From: Maximilian Date: Wed, 8 Feb 2023 19:47:08 -0600 Subject: [PATCH] Remove unnecessary assignment --- models/user.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/user.go b/models/user.go index 19f2e0d..ed7713b 100644 --- a/models/user.go +++ b/models/user.go @@ -148,8 +148,7 @@ func createSessionCookie(app *app.App, w http.ResponseWriter, username string) ( } // Store token in auth_token column of the users table - sqlStatement := "UPDATE users SET auth_token = $1 WHERE username = $2" - _, err = app.Db.Exec(sqlStatement, token, username) + _, err = app.Db.Exec("UPDATE users SET auth_token = $1 WHERE username = $2", token, username) if err != nil { log.Println("Error setting auth_token column in users table") log.Println(err)