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