Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f498d60

Browse files
author
Nick Litwin
committedDec 29, 2015
Remove unused request interceptor
1 parent 107c8b2 commit f498d60

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed
 

‎app/topcoder.interceptors.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function() {
22
'use strict';
3-
var HeaderInterceptor, JwtConfig;
3+
var JwtConfig;
44

55
JwtConfig = function($httpProvider, jwtInterceptorProvider) {
66
jwtInterceptorProvider.tokenGetter = ['config', 'JwtInterceptorService', function(config, JwtInterceptorService) {
@@ -9,18 +9,6 @@
99
return $httpProvider.interceptors.push('jwtInterceptor');
1010
};
1111

12-
HeaderInterceptor = function() {
13-
var attach;
14-
return attach = {
15-
request: function(request) {
16-
request.headers['Accept'] = 'application/json';
17-
request.headers['Content-Type'] = 'application/json';
18-
return request;
19-
}
20-
};
21-
};
22-
23-
angular.module('topcoder').factory('HeaderInterceptor', HeaderInterceptor);
2412
angular.module('topcoder').config(['$httpProvider', 'jwtInterceptorProvider', JwtConfig]);
2513

2614
})();

‎app/topcoder.module.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@
7272
// NotificationService.getNotifications();
7373
}
7474

75-
angular.module('topcoder').config(['$httpProvider', 'RestangularProvider', '$locationProvider',
76-
function($httpProvider, RestangularProvider, $locationProvider) {
75+
angular.module('topcoder').config(['RestangularProvider', '$locationProvider',
76+
function(RestangularProvider, $locationProvider) {
7777
$locationProvider.html5Mode(true);
78-
$httpProvider.interceptors.push('HeaderInterceptor');
7978
RestangularProvider.setRequestSuffix('/');
8079
}]);
8180

0 commit comments

Comments
 (0)
This repository has been archived.