add tagview

This commit is contained in:
2025-04-13 23:32:38 +02:00
parent 6943e3c9b7
commit fd46f35023
3 changed files with 34 additions and 8 deletions

View File

@@ -213,7 +213,16 @@ func (rc *UserController) MainView(c *gin.Context) {
"shopItems": shopItems,
})
fmt.Println(data)
c.HTML(http.StatusOK, "index.html", data)
}
func (rc *UserController) TagView(c *gin.Context) {
shopItems, _ := repositories.ShopItems.GetByTagId(c.Param("id"))
data := CreateSessionData(c, gin.H{
"title": "shopItem Page",
"shopItems": shopItems,
})
c.HTML(http.StatusOK, "index.html", data)
}