Skip to content
New issue

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

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

Already on GitHub? # to your account

♻️(api) refactor getting versions to expose pagination #258

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

sampaccoud
Copy link
Member

Purpose

Getting versions was not working properly. Some versions returned were not accessible by the user requesting the list of available versions.

Proposal

We refactor the code to make it simpler and let the frontend handle pagination (load more style).

@sampaccoud sampaccoud requested a review from AntoLC September 16, 2024 17:29
@sampaccoud sampaccoud self-assigned this Sep 16, 2024
@sampaccoud sampaccoud added bug Something isn't working python Pull requests that update Python code backend refacto labels Sep 16, 2024
@sampaccoud sampaccoud force-pushed the fix-404-when-getting-versions branch from 8aa042d to 1d67828 Compare September 16, 2024 17:37
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Works great!

I am just wondering if it is necessary to provide the latest version (the current one so).
Is it easy to add a filter on it on the backend side?
Otherwise, on the frontend side I have to apply a filter to display only the version where is_latest is at false
image

@sampaccoud sampaccoud force-pushed the fix-404-when-getting-versions branch from 1d67828 to 00e851b Compare September 22, 2024 07:07
@sampaccoud
Copy link
Member Author

I am just wondering if it is necessary to provide the latest version (the current one so). Is it easy to add a filter on it on the backend side? Otherwise, on the frontend side I have to apply a filter to display only the version where is_latest is at false !

It was not so trivial but I pushed a fixup for your review! 😅

@sampaccoud sampaccoud force-pushed the fix-404-when-getting-versions branch from 00e851b to f527df1 Compare September 22, 2024 07:09
@AntoLC AntoLC self-requested a review September 23, 2024 14:02
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Bravo !

@sampaccoud sampaccoud force-pushed the fix-404-when-getting-versions branch from f527df1 to 0ebba30 Compare September 23, 2024 14:07
@sampaccoud sampaccoud enabled auto-merge (rebase) September 23, 2024 14:08
@AntoLC AntoLC linked an issue Sep 23, 2024 that may be closed by this pull request
Getting versions was not working properly. Some versions returned
were not accessible by the user requesting the list of available
versions.

We refactor the code to make it simpler and let the frontend handle
pagination (load more style).
@sampaccoud sampaccoud force-pushed the fix-404-when-getting-versions branch from 0ebba30 to ee6f34b Compare September 27, 2024 12:50
@sampaccoud sampaccoud merged commit a2a184b into main Sep 27, 2024
16 of 17 checks passed
@sampaccoud sampaccoud deleted the fix-404-when-getting-versions branch September 27, 2024 12:59
@AntoLC AntoLC mentioned this pull request Oct 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
backend bug Something isn't working python Pull requests that update Python code refacto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 404 on some versions in environment
2 participants