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:
@@ -3,7 +3,6 @@ package api
|
||||
type bookPostCreate struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
Rating int `json:"rating" binding:"min=0,max=10"`
|
||||
}
|
||||
|
||||
type userSignup struct {
|
||||
@@ -15,3 +14,9 @@ type userLogin struct {
|
||||
Username string `json:"username" binding:"required,min=2,max=20"`
|
||||
Password string `json:"password" binding:"required,min=6,max=100"`
|
||||
}
|
||||
|
||||
type bookUserGet struct {
|
||||
Title string `json:"title" binding:"required,max=300"`
|
||||
Author string `json:"author" binding:"max=100"`
|
||||
Rating int `json:"rating" binding:"min=0,max=10"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user