import sources from develop/0.1.0

This commit is contained in:
Thomas Peetz
2025-04-29 12:52:55 +02:00
committed by Thomas Peetz
parent c30bdd1cd5
commit 19a5623075
670 changed files with 35977 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)
}
}