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): Remove a particular main license from an upload #2463

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

dushimsam
Copy link
Contributor

@dushimsam dushimsam commented Jun 12, 2023

Description

Added the API to delete a specific main license from an 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 DELETE /uploads/{id}/licenses/{licenseId}/main.
  3. Updated the openapi.yaml file to introduce a new API.

How to test

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

Screenshots

image

Related Issue:

Fixes #2459

cc: @shaheemazmalmmd @GMishx

@dushimsam dushimsam force-pushed the remove-main-license branch 2 times, most recently from 7b648cc to 7c1ca0f Compare June 13, 2023 08:51
@GMishx GMishx added the GSOC-23 Label to tag pull request which are part of the GSOC 2023 label Jun 22, 2023
src/www/ui/api/Controllers/UploadController.php Outdated Show resolved Hide resolved
@@ -837,4 +837,38 @@ public function getGroupsWithPermissions($request, $response, $args)
$res["permGroups"] = $finalPermGroups;
return $response->withJson($res, 200);
}

//remove main license
/***
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/***
/**

Copy link
Member

Choose a reason for hiding this comment

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

Quick reminder.

src/www/ui/api/documentation/openapi.yaml Outdated Show resolved Hide resolved
@dushimsam dushimsam force-pushed the remove-main-license branch 2 times, most recently from 17eeaf7 to 6c28191 Compare June 23, 2023 13:56
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.

Another minor change needed.

src/www/ui/api/index.php Outdated Show resolved Hide resolved
@github-actions
Copy link

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.

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.

Tested, working as expected.

@GMishx GMishx added ready has merge conflicts PR to be rebased and removed needs test labels Jul 3, 2023
@github-actions github-actions bot removed the has merge conflicts PR to be rebased label Jul 3, 2023
@GMishx GMishx merged commit 27ead7b into fossology:master Jul 4, 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