Removed debug prints

This commit is contained in:
2023-07-16 17:24:46 +01:00
parent 3666c4efbc
commit 95be6c0fca

View File

@@ -2,7 +2,6 @@ package main
import ( import (
"database/sql" "database/sql"
"fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
"net/http" "net/http"
@@ -54,12 +53,10 @@ func login(c *gin.Context) {
checkErr(err) checkErr(err)
defer stmt.Close() defer stmt.Close()
var user loginOutput var user loginOutput
fmt.Printf("%s", userData.Name)
err = stmt.QueryRow(userData.Name).Scan(&user.Name, &user.Password, &user.UID, &user.Role) err = stmt.QueryRow(userData.Name).Scan(&user.Name, &user.Password, &user.UID, &user.Role)
if err != nil { if err != nil {
// search failed user not real // search failed user not real
c.IndentedJSON(http.StatusNotAcceptable, userData) c.IndentedJSON(http.StatusNotAcceptable, userData)
fmt.Print(err)
return return
} }
if user.Password != userData.Password { if user.Password != userData.Password {