Refactors most controllers and directives into classes for more organized and maintainable code
This commit is contained in:
13
app/assets/javascripts/services/httpManager.js
Normal file
13
app/assets/javascripts/services/httpManager.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SFHttpManager } from 'snjs';
|
||||
|
||||
export class HttpManager extends SFHttpManager {
|
||||
/* @ngInject */
|
||||
constructor(storageManager, $timeout) {
|
||||
// calling callbacks in a $timeout allows UI to update
|
||||
super($timeout);
|
||||
|
||||
this.setJWTRequestHandler(async () => {
|
||||
return storageManager.getItem('jwt');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user