Integrate users and books
- new table userbook linking users and book - moved rating to users book - updated demo data and tests - updated front to hide routes from non connected users
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -20,7 +19,6 @@ func Auth() gin.HandlerFunc {
|
||||
|
||||
username, err := parseUserFromJwt(c)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
c.AbortWithStatusJSON(http.StatusUnauthorized,
|
||||
gin.H{"error": "You must be logged in to access this resource."})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user