-
Notifications
You must be signed in to change notification settings - Fork 89
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
[backend/frontend] fix bulk update injects #1628
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1628 +/- ##
============================================
- Coverage 32.38% 32.36% -0.03%
Complexity 1508 1508
============================================
Files 545 545
Lines 14110 14119 +9
Branches 844 844
============================================
Hits 4569 4569
- Misses 9327 9336 +9
Partials 214 214 ☔ View full report in Codecov by Sentry. |
openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java
Outdated
Show resolved
Hide resolved
openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java
Outdated
Show resolved
Hide resolved
openbas-api/src/main/java/io/openbas/rest/inject/InjectApi.java
Outdated
Show resolved
Hide resolved
@PreAuthorize("isScenarioPlanner(#scenarioId)") | ||
public Inject bulkUpdateInjectForScenario( | ||
@PathVariable String scenarioId, | ||
@PathVariable String injectId, |
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.
I'm gonna be super annoying but in a bulk update endpoint, shouldn't we send the list of injects to update in one call instead of having many calls viewed as bulk ? Since this endpoint is dedicated to those kind of calls, that would make sense and prevent us from calling a lot of times the API for almost the same call with just the inject id changing ...
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.
You are right! I'll modify it, thank you!
0ff5216
to
156f174
Compare
ed54fba
to
e3ba65d
Compare
Proposed changes
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...