package comics

import (
	"gitlab.thpeetz.de/kontor/kontor-go/pkg/auth"

	"github.com/gin-gonic/gin"
)

// GetRoutes returns all routes for comic related data.
func GetRoutes(router *gin.Engine) {
	comicRoutes := router.Group("/comics")
	{
		comicRoutes.GET("/", auth.EnsureLoggedIn(), showComicList)
		comicRoutes.GET("/artist", auth.EnsureLoggedIn(), showArtistList)
		comicRoutes.GET("/artist/view/:artist_id", auth.EnsureLoggedIn(), showArtistList)
		comicRoutes.GET("/artist/create", auth.EnsureLoggedIn(), showArtistList)
		comicRoutes.POST("/artist/create", auth.EnsureLoggedIn(), showArtistList)
		comicRoutes.GET("/comic", auth.EnsureLoggedIn(), showComicList)
		comicRoutes.GET("/comic/view/:comic_id", auth.EnsureLoggedIn(), showComic)
		comicRoutes.GET("/comic/create", auth.EnsureLoggedIn(), showComicList)
		comicRoutes.POST("/comic/create", auth.EnsureLoggedIn(), showComicList)
		comicRoutes.GET("/publisher", auth.EnsureLoggedIn(), showPublisherList)
		comicRoutes.POST("/publisher", auth.EnsureLoggedIn(), showPublisherList)
		comicRoutes.GET("/publisher/view/:publisher_id", auth.EnsureLoggedIn(), showPublisherDetails)
		comicRoutes.POST("/publisher/validate", auth.EnsureLoggedIn(), validatePublisherDetails)
		comicRoutes.GET("/publisher/create", auth.EnsureLoggedIn(), showPublisherCreation)
	}
}
