Fix error page url resolution.
Now it properly redirects to error page when api service is down.stable
parent
4f71ed2e04
commit
f237e97f45
|
@ -141,6 +141,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, tgLoade
|
||||||
return promise.then null, (response) ->
|
return promise.then null, (response) ->
|
||||||
if response.status == 0
|
if response.status == 0
|
||||||
$location.path($navUrls.resolve("error"))
|
$location.path($navUrls.resolve("error"))
|
||||||
|
$location.replace()
|
||||||
else if response.status == 401
|
else if response.status == 401
|
||||||
nextPath = $location.path()
|
nextPath = $location.path()
|
||||||
$location.url($navUrls.resolve("login")).search("next=#{nextPath}")
|
$location.url($navUrls.resolve("login")).search("next=#{nextPath}")
|
||||||
|
|
|
@ -44,6 +44,7 @@ module.directive("tgMain", ["$rootScope", "$window", TaigaMainDirective])
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
"home": "/"
|
"home": "/"
|
||||||
|
"error": "/error"
|
||||||
"login": "/login"
|
"login": "/login"
|
||||||
"forgot-password": "/forgot-password"
|
"forgot-password": "/forgot-password"
|
||||||
"change-password": "/change-password/:token"
|
"change-password": "/change-password/:token"
|
||||||
|
|
Loading…
Reference in New Issue