fix: updated handlers to use new DecodeJSON generic function

This commit is contained in:
2026-08-14 16:58:52 +02:00
parent e0ab3bb51a
commit 93fd79560c
6 changed files with 20 additions and 69 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ func NewListHandler(listService *domain.ListService) *ListHandler {
func (h *ListHandler) CreateList(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
payload, err := request.DecodeCreateList(r)
payload, err := request.DecodeJSON[request.CreateListPayload](r)
if err != nil {
slog.ErrorContext(ctx, "failed to decode create list payload", slog.Any("error", err))
response.Error(ctx, w, http.StatusBadRequest, "failed to decode request body")