-
Notifications
You must be signed in to change notification settings - Fork 101
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
Conversation
2b03949
to
b6875c7
Compare
@BasePathAwareController | ||
@RequiredArgsConstructor(onConstructor = @__(@Autowired)) | ||
public class AttachmentCleanUpController implements RepresentationModelProcessor<RepositoryLinksResource> { | ||
public static final String ATTACHMENTCLEANUP_URL = "/attachmentCleanUp"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo attachmentCleanupservive -> attachmentCleanUpService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikkuma7 service not servive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
b6875c7
to
07b347c
Compare
private final RestControllerHelper restControllerHelper; | ||
|
||
@NonNull | ||
private final Sw360AttachmentCleanUpService attachmentCleanUpServive; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo attachmentCleanUpServive -> attachmentCleanUpService
07b347c
to
fcfa737
Compare
fcfa737
to
72d5bfa
Compare
72d5bfa
to
1ad5029
Compare
1ad5029
to
5cf5471
Compare
Hi @hoangnt2 , Could you please review my code. And please let me know if you find any issue. |
@hoangnt2 is vacation now. He will restart to review from next week. |
Code look good to me |
@nikkuma7, please solve confict |
Signed-off-by: Nikesh kumar <[email protected]>
5cf5471
to
16475d7
Compare
done. |
Issue: #2172
Suggest Reviewer
How To Test?
1: Login with Admin user.
Sample URL : http://localhost:8080/resource/api/attachmentCleanUp/deleteAll
Checklist
Must: