-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[refactor] move code from CollectorController to CollectorService #2433
[refactor] move code from CollectorController to CollectorService #2433
Conversation
it seems that code style question: you can run |
@ceekay47 Hi, please fix Backend CI on your branch when you have time. |
@Calvin979 @yuluo-yx Fixed the Checkstyle errors. Can you please take a look? Thanks. |
try { | ||
this.collectorService.deleteRegisteredCollector(collectors); | ||
return ResponseEntity.ok(Message.success("Delete success")); | ||
} catch (CommonException ex) { |
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.
This can be removed because CommonException
is handled by GlobalExceptionHandler
.
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.
Thanks, fixed.
return ResponseEntity.ok(Message.fail(CommonConstants.FAIL_CODE, "There already has same collector name.")); | ||
try { | ||
return ResponseEntity.ok(Message.success(collectorService.generateCollectorDeployInfo(collector))); | ||
} catch (CommonException ex) { |
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.
The same
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.
Fixed.
lgtm |
What's changed?
Move code from CollectorController to CollectorService
Checklist
Add or update API