import other kontor repos into directories
This commit is contained in:
committed by
Thomas Peetz
parent
28746adfbb
commit
b424e95e05
@@ -0,0 +1,22 @@
|
||||
package library
|
||||
|
||||
import (
|
||||
"gitlab.thpeetz.de/kontor/kontor-go/pkg/auth"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// GetRoutes returns all routes for library related data.
|
||||
func GetRoutes(router *gin.Engine) {
|
||||
libraryRoutes := router.Group("/library")
|
||||
{
|
||||
libraryRoutes.GET("/", auth.EnsureLoggedIn(), showBookList)
|
||||
libraryRoutes.GET("/book", auth.EnsureLoggedIn(), showBookList)
|
||||
libraryRoutes.GET("/author", auth.EnsureLoggedIn(), showAuthorList)
|
||||
libraryRoutes.GET("/publisher", auth.EnsureLoggedIn(), showPublisherList)
|
||||
libraryRoutes.POST("/publisher", auth.EnsureLoggedIn(), showPublisherList)
|
||||
libraryRoutes.GET("/publisher/view/:publisher_id", auth.EnsureLoggedIn(), showPublisherDetails)
|
||||
libraryRoutes.POST("/publisher/validate", auth.EnsureLoggedIn(), validatePublisherDetails)
|
||||
libraryRoutes.GET("/publisher/create", auth.EnsureLoggedIn(), showPublisherCreation)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user