Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Leemoonsoo committed Jul 5, 2017
1 parent bf15efc commit 073c128
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions zeppelin-web/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,24 @@ let zeppelinWebApp = angular.module('zeppelinWebApp', requiredModules)

// handel logout on API failure
.config(function ($httpProvider, $provide) {
if (process.env.PROD) {
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
}
$provide.factory('httpInterceptor', function ($q, $rootScope) {
return {
'responseError': function (rejection) {
if (rejection.status === 405) {
let data = {}
data.info = ''
$rootScope.$broadcast('session_logout', data)
if (process.env.PROD) {
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
}
$provide.factory('httpInterceptor', function ($q, $rootScope) {
return {
'responseError': function (rejection) {
if (rejection.status === 405) {
let data = {}
data.info = ''
$rootScope.$broadcast('session_logout', data)
}
$rootScope.$broadcast('httpResponseError', rejection)
return $q.reject(rejection)
}
$rootScope.$broadcast('httpResponseError', rejection)
return $q.reject(rejection)
}
}
})
$httpProvider.interceptors.push('httpInterceptor')
})
$httpProvider.interceptors.push('httpInterceptor')
})
.constant('TRASH_FOLDER_ID', '~Trash')

function auth () {
Expand Down

0 comments on commit 073c128

Please sign in to comment.