diff --git a/main b/main index 5bacc5f..db3c9b8 100755 Binary files a/main and b/main differ diff --git a/main.go b/main.go index 9d35588..a8698e1 100644 --- a/main.go +++ b/main.go @@ -58,15 +58,17 @@ func login(c *gin.Context) { checkErr(err) defer stmt.Close() var user loginOutput - err = stmt.QueryRow(userData.Name).Scan(&user.Name, &user.Password, &user.UID, &user.Role) + err = stmt.QueryRow(userData.Name).Scan(&user.UID, &user.Name, &user.Password, &user.Role) if err != nil { // search failed user not real c.IndentedJSON(http.StatusNotFound, userData) + panic(err) return } if user.Password != userData.Password { // user not real c.IndentedJSON(http.StatusNotFound, userData) + panic(err) return } else { // user is in @@ -176,9 +178,6 @@ func main() { }) router.Static("/frontend", "./frontend") - // asset routes - router.Static("/scripts", "./scripts") - router.Run("localhost:8080") }