WIP: add missing handlers, services nd repositories
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
Gitea Actions Demo / build-and-test (push) Failing after 12s

This commit is contained in:
2026-11-06 21:20:24 +01:00
parent 50e2da8a66
commit 79653d2c43
27 changed files with 865 additions and 315 deletions
+7 -8
View File
@@ -1,14 +1,13 @@
package handlers
import (
"kontor-api-gin/internal/globals"
"kontor-api-gin/internal/models"
"kontor-api-gin/internal/repository"
"kontor-api-gin/internal/service"
"kontor-api-echo/internal/globals"
"kontor-api-echo/internal/models"
"kontor-api-echo/internal/repository"
"kontor-api-echo/internal/service"
"net/http"
"time"
"github.com/gin-contrib/sessions"
"github.com/google/uuid"
"github.com/labstack/echo/v5"
"github.com/uptrace/bun"
@@ -170,8 +169,8 @@ func (handler *MediaLoFiHandler) ChangeReviewPage(c *echo.Context) {
lofi.Review = !lofi.Review
handler.Service.Update(c.Request().Context(), lofi.ConvertMediaLoFiToDTO())
logger.Info("MediaLoFiHandler#ChangeReviewPage", "lofi", lofi)
session := sessions.Default(c)
user := session.Get(globals.UserKey)
cookie, err := c.Cookie(globals.UserKey)
user := cookie.Value
lofis, err := handler.Service.List(c.Request().Context())
if err != nil {
logger.Info("MediaLoFiHandler#ChangeReviewPage", "error", err.Error())
@@ -199,7 +198,7 @@ func (handler *MediaLoFiHandler) UpdatePage(c *echo.Context) {
var form models.MediaLoFiForm
if err := c.Bind(&form); err != nil {
logger.Info("MediaLoFiHandler#UpdatePage", "error", err.Error())
c.Render(http.StatusBadRequest, "lofi_detail", map[string]string{
c.Render(http.StatusBadRequest, "lofi_detail", map[string]any{
"Form": form,
"Errors": err.Error(),
"user": user,