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(api): API to handle three filters to get prev & next item #2480

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

dushimsam
Copy link
Contributor

@dushimsam dushimsam commented Jun 18, 2023

Description

Added the API to get the what should be the next and the previous item, given the current Item Id.

Changes

  1. Added a new method in UploadTreeController to handle the logic.
  2. Updated the main file(index.php) by adding a new route GET /uploads/{id}/items/{itemId}/prev-next.
  3. Updated the openapi.yaml file to write the new API's documentation.

How to test

Make a GET request on the endpoint: GET /uploads/{id}/items/{itemId}/prev-next.

Screenshots

1. Without any filter

image

2. WithLicenses filter

image

3. noClearing Filter

image

Related Issue:

Fixes #2472

cc: @shaheemazmalmmd @GMishx

@GMishx GMishx added needs code review needs test GSOC-23 Label to tag pull request which are part of the GSOC 2023 labels Jun 22, 2023
@github-actions github-actions bot added the has merge conflicts PR to be rebased label Jun 29, 2023
@github-actions
Copy link

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@GMishx
Copy link
Member

GMishx commented Jun 29, 2023

Would've been nice if you would have posted the postman screenshots with Param tab open rather than Body 😄

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Minor changes.

src/www/ui/api/Controllers/UploadTreeController.php Outdated Show resolved Hide resolved
src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
@GMishx
Copy link
Member

GMishx commented Jun 29, 2023

Tested, working as expected.

@GMishx GMishx removed the needs test label Jun 29, 2023
@dushimsam
Copy link
Contributor Author

Would've been nice if you would have posted the postman screenshots with Param tab open rather than Body smile

Eish, I messed up 🥴

@github-actions github-actions bot added has merge conflicts PR to be rebased and removed has merge conflicts PR to be rebased labels Jul 2, 2023
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

@dushimsam
Copy link
Contributor Author

dushimsam commented Jul 3, 2023

Would've been nice if you would have posted the postman screenshots with Param tab open rather than Body smile

Eish, I messed up

image

@github-actions github-actions bot added has merge conflicts PR to be rebased and removed has merge conflicts PR to be rebased labels Jul 3, 2023
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

1 similar comment
@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This pull request has conflicts, please rebase with master to resolve those before we can evaluate the pull request.

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Changes looks good.

@GMishx
Copy link
Member

GMishx commented Jul 5, 2023

@dushimsam , please rebase for merge.

@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jul 5, 2023
@dushimsam
Copy link
Contributor Author

@dushimsam , please rebase for merge.

Done

@GMishx GMishx merged commit 89e4f7d into fossology:master Jul 5, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSOC-23 Label to tag pull request which are part of the GSOC 2023 ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License File View - Bulk History
2 participants