fix: all log messages are now lower case
This commit is contained in:
@@ -18,18 +18,18 @@ func (h *ListHandler) CreateList(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
payload, err := request.DecodeCreateList(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")
|
||||
slog.ErrorContext(ctx, "failed to decode create list payload", slog.Any("error", err))
|
||||
response.Error(ctx, w, http.StatusBadRequest, "failed to decode request body")
|
||||
return
|
||||
}
|
||||
|
||||
list, err := h.ListService.Create(ctx, payload.Name, payload.UserIDs)
|
||||
if err != nil {
|
||||
slog.ErrorContext(ctx, "Failed to create list", slog.Any("error", err))
|
||||
response.Error(ctx, w, http.StatusInternalServerError, "Failed to create list")
|
||||
slog.ErrorContext(ctx, "failed to create list", slog.Any("error", err))
|
||||
response.Error(ctx, w, http.StatusInternalServerError, "failed to create list")
|
||||
return
|
||||
}
|
||||
|
||||
slog.InfoContext(ctx, "Created list successfully", slog.Any("list_id", list.ID))
|
||||
slog.InfoContext(ctx, "created list successfully", slog.Any("list_id", list.ID))
|
||||
response.JSON(ctx, w, http.StatusCreated, list)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user