change templates
This commit is contained in:
@@ -37,13 +37,15 @@ func (handler *MediaVideoHandler) List(c *gin.Context) {
|
||||
func (handler *MediaVideoHandler) ListPage(c *gin.Context) {
|
||||
session := sessions.Default(c)
|
||||
user := session.Get(globals.UserKey)
|
||||
logger := slog.Get(c)
|
||||
videos, err := handler.Service.List(c.Request.Context())
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
data := globals.GetDefaultValues(user, "MediaFiles...")
|
||||
data["title"] = "Kontor MediaFiles"
|
||||
logger.Info("MediaLoFiHandler#ListPage", "videos count", len(videos))
|
||||
data := globals.GetDefaultValues(user, "MediaVideos...")
|
||||
data["title"] = "Kontor MediaVideos"
|
||||
data["mediavideos"] = videos
|
||||
|
||||
c.HTML(http.StatusOK, "mediavideos", data)
|
||||
|
||||
Reference in New Issue
Block a user