|
|
@@ -95,7 +95,7 @@ func (h *ListHandler) DeleteList(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "deleted list successfully", slog.Any("list_id", listID))
|
|
|
|
slog.InfoContext(ctx, "deleted list successfully", slog.Any("list_id", listID))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetLists handles fetching lists for the current user
|
|
|
|
// GetLists handles fetching lists for the current user
|
|
|
@@ -175,7 +175,7 @@ func (h *ListHandler) AddUserToList(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "added user to list successfully", slog.Any("list_id", payload.ListID), slog.Any("email", user.Email))
|
|
|
|
slog.InfoContext(ctx, "added user to list successfully", slog.Any("list_id", payload.ListID), slog.Any("email", user.Email))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// RemoveUserFromList handles the removal of a user association to a list
|
|
|
|
// RemoveUserFromList handles the removal of a user association to a list
|
|
|
@@ -223,7 +223,7 @@ func (h *ListHandler) RemoveUserFromList(w http.ResponseWriter, r *http.Request)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "removed user from list successfully", slog.Any("list_id", payload.ListID), slog.Any("email", user.Email))
|
|
|
|
slog.InfoContext(ctx, "removed user from list successfully", slog.Any("list_id", payload.ListID), slog.Any("email", user.Email))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CreateListItem handles creation of a new list item on a given list
|
|
|
|
// CreateListItem handles creation of a new list item on a given list
|
|
|
@@ -303,7 +303,7 @@ func (h *ListHandler) DeleteListItem(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "deleted list item successfully", slog.Any("list_item_id", listItemID))
|
|
|
|
slog.InfoContext(ctx, "deleted list item successfully", slog.Any("list_item_id", listItemID))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UpdateListItem handles updating of a list item
|
|
|
|
// UpdateListItem handles updating of a list item
|
|
|
@@ -344,7 +344,7 @@ func (h *ListHandler) UpdateListItem(w http.ResponseWriter, r *http.Request) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "updated list item successfully", slog.Any("list_item_id", payload.ListItemID))
|
|
|
|
slog.InfoContext(ctx, "updated list item successfully", slog.Any("list_item_id", payload.ListItemID))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// SetListItemCompleted handles updating "is_completed" of a list item
|
|
|
|
// SetListItemCompleted handles updating "is_completed" of a list item
|
|
|
@@ -394,7 +394,7 @@ func (h *ListHandler) SetListItemCompleted(w http.ResponseWriter, r *http.Reques
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
slog.InfoContext(ctx, "updated list item completed successful", slog.Any("list_item_id", listItemID))
|
|
|
|
slog.InfoContext(ctx, "updated list item completed successful", slog.Any("list_item_id", listItemID))
|
|
|
|
response.Status(ctx, w, http.StatusNoContent)
|
|
|
|
response.Status(w, http.StatusNoContent)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetListItems handles return all list items of a list
|
|
|
|
// GetListItems handles return all list items of a list
|
|
|
|