Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add collection notes endpoint #444

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

yolile
Copy link
Member

@yolile yolile commented Dec 13, 2024

closes #443

@yolile yolile requested a review from jpmckinney December 13, 2024 18:33
@action(detail=True)
def notes(self, request, pk=None):
"""Return the notes for the compiled collection and its parent collection."""
compiled_collection = get_object_or_404(Collection, pk=pk)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why request the compiled collection? I think it'd be more generic to request the root collection, and then get notes from all child collections.

@@ -232,6 +232,21 @@ def metadata(self, request, pk=None):

return Response(metadata)

@action(detail=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other views use @extend_schema to define the output format. This is only to improve the OpenAPI docs. You can create a follow-up issue instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a new endpoint for collection_note
2 participants