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): add the new main license for the upload #2462

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

dushimsam
Copy link
Contributor

@dushimsam dushimsam commented Jun 9, 2023

Description

Added the API to set a specific license as the main license for the given Upload

Changes

  1. Added a new method in UploadController to handle the logic.
  2. Updated the main file(index.php) by adding a new route POST /uploads/{id}/licenses/main.
  3. Updated the openapi.yaml file to introduce a new API.

How to test

Make a POST request on the endpoint: /uploads/{id}/licenses/main.

Screenshots

image

Related Issue:

Fixes #2459

cc: @shaheemazmalmmd @GMishx

@dushimsam dushimsam force-pushed the set-main-license branch 2 times, most recently from 92e9b1c to 1da2768 Compare June 13, 2023 08:52
@GMishx GMishx added the GSOC-23 Label to tag pull request which are part of the GSOC 2023 label Jun 22, 2023
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 needed.

src/www/ui/api/Controllers/UploadController.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/UploadController.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/UploadController.php Outdated Show resolved Hide resolved
src/www/ui/api/Controllers/UploadController.php Outdated Show resolved Hide resolved
@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.

@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 30, 2023

Tested, working as expected.

Signed-off-by: dushimsam <dushsam@gmail.com>
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 GMishx merged commit 6afe12d into fossology:master Jul 3, 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 - Details
3 participants