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:
4
main.go
4
main.go
@@ -26,8 +26,8 @@ func setup(config *config.Config) *gin.Engine {
|
||||
r := gin.Default()
|
||||
r.Use(cors.New(configureCors())) // All origins allowed by default
|
||||
r.Use(middleware.Auth())
|
||||
r.GET("/books", func(c *gin.Context) {
|
||||
api.GetBooksHanderl(c, db)
|
||||
r.GET("/mybooks", func(c *gin.Context) {
|
||||
api.GetMyBooksHanderl(c, db)
|
||||
})
|
||||
r.POST("/book", func(c *gin.Context) {
|
||||
api.PostBookHandler(c, db)
|
||||
|
||||
Reference in New Issue
Block a user