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

The "Load Comment" endpoint is limited #809

Open
NicoPennec opened this issue May 17, 2024 · 2 comments
Open

The "Load Comment" endpoint is limited #809

NicoPennec opened this issue May 17, 2024 · 2 comments
Assignees

Comments

@NicoPennec
Copy link
Member

Context
Zou version: 0.19.31

Describe the bug
The endpoint to load all comments returns a list of comments with a list of "preview" objects in the previews property.

GET /data/tasks/{taskId}/comments

However, the endpoint to load one comment returns a comment with only a list of preview IDs in the previews property.

GET /data/comments/{commentId}?relations=true

Expected behavior
Have complete preview objects in the previews property for the "load comment" endpoint.

@EvanBldy
Copy link
Member

Hi @NicoPennec,

We can't do that /data/comments/{commentId} is a generic route, when you add relations=true you just get the ids of the relation. /data/tasks/{taskId}/comments have by design the full objects.

@EvanBldy
Copy link
Member

Maybe generic routes can be used to get relation objects with a query parameter? Like: "relation-objects=true"

@EvanBldy EvanBldy added enhancement and removed bug labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants