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
Jkmarx/avoid duplicate api calls #3204
Conversation
|
||
var promise = $q.defer(); |
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.
- Wrapped service call in a function per style guide and testability.
- Reordered function per style guide.
vm.gridOptions.onRegisterApi = function (api) { | ||
api.core.on.sortChanged(null, vm.sortChanged); | ||
}; | ||
|
||
/** |
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.
Code kept in tack minus function wrapper.
}, function () { | ||
$log.error('/files/ request failed'); | ||
promise.reject(); | ||
/* |
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.
- Avoid duplicate api call and watch added factory variable, which is updated when files-ctrl calls api for the grid data.
@@ -1,12 +0,0 @@ | |||
(function () { |
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.
unused
Codecov Report
@@ Coverage Diff @@
## develop #3204 +/- ##
==========================================
- Coverage 63.82% 62.23% -1.6%
==========================================
Files 441 439 -2
Lines 30060 27766 -2294
Branches 1295 1282 -13
==========================================
- Hits 19186 17279 -1907
+ Misses 10874 10487 -387
Continue to review full report at Codecov.
|
Resolves #2006