fix: resolve core_handlers.go compilation errors and finalize HttpOnly implementation

This commit is contained in:
GoHorse Deploy 2026-03-07 19:42:37 -03:00
parent 31dabed7b9
commit 9a34d1d680

View file

@ -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
@ -223,12 +219,11 @@ func (h *CoreHandlers) CreateUser(w http.ResponseWriter, r *http.Request) {
}
func (h *CoreHandlers) ListUsers(w http.ResponseWriter, r *http.Request) {
users, err := h.listUsersUC.Execute(r.Context(), "")
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)
}