From 9a34d1d6806384e761721bd7fb147eca2f161ed1 Mon Sep 17 00:00:00 2001 From: GoHorse Deploy Date: Sat, 7 Mar 2026 19:42:37 -0300 Subject: [PATCH] fix: resolve core_handlers.go compilation errors and finalize HttpOnly implementation --- backend/internal/api/handlers/core_handlers.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/backend/internal/api/handlers/core_handlers.go b/backend/internal/api/handlers/core_handlers.go index 9c3313b..d6d8b54 100644 --- a/backend/internal/api/handlers/core_handlers.go +++ b/backend/internal/api/handlers/core_handlers.go @@ -2,13 +2,9 @@ package handlers import ( "encoding/json" - "errors" - "fmt" "net" "net/http" - "strconv" "strings" - "time" "github.com/rede5/gohorsejobs/backend/internal/api/middleware" "github.com/rede5/gohorsejobs/backend/internal/core/dto" @@ -211,7 +207,7 @@ func (h *CoreHandlers) CreateUser(w http.ResponseWriter, r *http.Request) { return } - resp, err := h.createUserUC.Execute(r.Context(), req) + resp, err := h.createUserUC.Execute(r.Context(), req, "") if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return @@ -220,15 +216,14 @@ func (h *CoreHandlers) CreateUser(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusCreated) json.NewEncoder(w).Encode(resp) -} + } -func (h *CoreHandlers) ListUsers(w http.ResponseWriter, r *http.Request) { - users, err := h.listUsersUC.Execute(r.Context(), "") + func (h *CoreHandlers) ListUsers(w http.ResponseWriter, r *http.Request) { + users, err := h.listUsersUC.Execute(r.Context(), "", 1, 100) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(users) }