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

fix(rest) : create new endpoint for cleanup attachment. #2173

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

nikkuma7
Copy link
Contributor

@nikkuma7 nikkuma7 commented Nov 8, 2023

Please provide a summary of your changes here.

  • Which issue is this pull request belonging to and how is it solving it? (Refer to issue here)
  • Did you add or update any new dependencies that are required for your change?

Issue: #2172

Suggest Reviewer

You can suggest reviewers here with an @mention.

How To Test?

1: Login with Admin user.
Sample URL : http://localhost:8080/resource/api/attachmentCleanUp/deleteAll

How should these changes be tested by the reviewer?
Have you implemented any additional tests?

Checklist

Must:

  • All related issues are referenced in commit messages and in PR

@rudra-superrr rudra-superrr added the WIP work in progress label Nov 8, 2023
@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch 5 times, most recently from 2b03949 to b6875c7 Compare November 10, 2023 12:04
@smrutis1 smrutis1 added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for and removed WIP work in progress labels Nov 10, 2023
@BasePathAwareController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class AttachmentCleanUpController implements RepresentationModelProcessor<RepositoryLinksResource> {
public static final String ATTACHMENTCLEANUP_URL = "/attachmentCleanUp";
Copy link
Contributor

Choose a reason for hiding this comment

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

ATTACHMENTCLEANUP_URL -> ATTACHMENT_CLEANUP_URL

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

private final RestControllerHelper restControllerHelper;

@NonNull
private final Sw360AttachmentCleanUpService attachmentCleanupservive;
Copy link
Contributor

Choose a reason for hiding this comment

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

typo attachmentCleanupservive -> attachmentCleanUpService

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nikkuma7 service not servive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from b6875c7 to 07b347c Compare November 16, 2023 05:54
@KoukiHama KoukiHama requested a review from hoangnt2 November 16, 2023 08:19
private final RestControllerHelper restControllerHelper;

@NonNull
private final Sw360AttachmentCleanUpService attachmentCleanUpServive;
Copy link
Contributor

Choose a reason for hiding this comment

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

typo attachmentCleanUpServive -> attachmentCleanUpService

public ResponseEntity<RequestSummary> cleanUpAttachment() throws TException {
User sw360User = restControllerHelper.getSw360UserFromAuthentication();
RequestSummary requestSummary = attachmentCleanUpServive.cleanUpAttachments(sw360User);
return new ResponseEntity<>(requestSummary,HttpStatus.OK);
Copy link
Contributor

Choose a reason for hiding this comment

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

typo attachmentCleanUpServive -> attachmentCleanUpService

@hoangnt2
Copy link
Contributor

hoangnt2 commented Dec 1, 2023

Test successfully
test1

@hoangnt2 hoangnt2 removed the needs general test This is general testing, meaning that there is no org specific issue to check for label Dec 1, 2023
@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from 07b347c to fcfa737 Compare December 6, 2023 09:17
@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from fcfa737 to 72d5bfa Compare December 13, 2023 08:58
@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from 72d5bfa to 1ad5029 Compare December 13, 2023 09:21
@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from 1ad5029 to 5cf5471 Compare January 17, 2024 09:12
@nikkuma7
Copy link
Contributor Author

Hi @hoangnt2 , Could you please review my code. And please let me know if you find any issue.

@KoukiHama
Copy link
Member

@hoangnt2 is vacation now.  He will restart to review from next week.

@KoukiHama KoukiHama requested a review from hoangnt2 February 14, 2024 05:42
@hoangnt2
Copy link
Contributor

Code look good to me

@hoangnt2
Copy link
Contributor

@nikkuma7, please solve confict

@nikkuma7 nikkuma7 force-pushed the fix/CleanUpAttachment branch from 5cf5471 to 16475d7 Compare February 28, 2024 04:22
@nikkuma7
Copy link
Contributor Author

@nikkuma7, please solve confict

done.

@tienlee tienlee added ready ready to merge and removed has merge conflicts labels Feb 28, 2024
@ag4ums ag4ums merged commit 79dd26e into eclipse-sw360:main Feb 28, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants