mirror of
https://github.com/arnaucube/commonroutesApp.git
synced 2026-02-07 11:36:42 +01:00
post new offering travel, and user page
This commit is contained in:
@@ -131,7 +131,7 @@ angular.module('starter', [
|
||||
}
|
||||
})
|
||||
.state('app.user', {
|
||||
url: '/users/:username',
|
||||
url: '/users/:userid',
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: 'templates/user.html',
|
||||
@@ -201,4 +201,31 @@ angular.module('starter', [
|
||||
|
||||
$translateProvider.useSanitizeValueStrategy('escape');
|
||||
|
||||
}]);
|
||||
}])
|
||||
.factory('httpInterceptor', function httpInterceptor($q, $window, $location) {
|
||||
return {
|
||||
request: function (config) {
|
||||
return config;
|
||||
},
|
||||
requestError: function (config) {
|
||||
return config;
|
||||
},
|
||||
response: function (res) {
|
||||
return res;
|
||||
},
|
||||
responseError: function (res) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
})
|
||||
.factory('api', function ($http) {
|
||||
return {
|
||||
init: function () {
|
||||
$http.defaults.headers.common['X-Access-Token'] = localStorage.getItem("cim_app_token");
|
||||
$http.defaults.headers.post['X-Access-Token'] = localStorage.getItem("cim_app_token");
|
||||
}
|
||||
};
|
||||
})
|
||||
.run(function (api) {
|
||||
api.init();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user