import other kontor repos into directories

This commit is contained in:
Thomas Peetz
2025-01-09 19:28:50 +01:00
committed by Thomas Peetz
parent 28746adfbb
commit b424e95e05
319 changed files with 17211 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package comics
import (
"net/http"
"github.com/gin-gonic/gin"
"gitlab.thpeetz.de/kontor/kontor-go/pkg/dao"
"gitlab.thpeetz.de/kontor/kontor-go/pkg/util"
)
const (
// ArtistPublisherTemplate defines name of template file for comics publishers
ArtistPublisherTemplate = "comics/publishers.html"
)
func showArtistList(c *gin.Context) {
var dao = ArtistDAO{Db: dao.KontorDb}
if artists, err := dao.FindAll(); err == nil {
util.Render(c, gin.H{"title": "Comic Artists", "payload": artists}, "artists.html")
} else {
c.AbortWithError(http.StatusNotFound, err)
}
}