summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/pixelated/assets/Interstitial.js2
-rw-r--r--service/pixelated/resources/login_resource.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/service/pixelated/assets/Interstitial.js b/service/pixelated/assets/Interstitial.js
index cda56a4b..2eaa7a1c 100644
--- a/service/pixelated/assets/Interstitial.js
+++ b/service/pixelated/assets/Interstitial.js
@@ -44,7 +44,7 @@ $(function () {
method: 'GET',
url: '/login/status'
}).success(function (data) {
- if (data === 'completed' || data === 'error') {
+ if (data.status === 'completed' || data.status === 'error') {
window.location="/";
}
});
diff --git a/service/pixelated/resources/login_resource.py b/service/pixelated/resources/login_resource.py
index 77ebca70..4bbceb89 100644
--- a/service/pixelated/resources/login_resource.py
+++ b/service/pixelated/resources/login_resource.py
@@ -20,7 +20,7 @@ from xml.sax import SAXParseException
from pixelated.authentication import Authenticator
from pixelated.config.leap import BootstrapUserServices
from pixelated.resources import BaseResource, UnAuthorizedResource, IPixelatedSession
-from pixelated.resources import get_startup_folder
+from pixelated.resources import get_startup_folder, respond_json
from twisted.cred.error import UnauthorizedLogin
from twisted.internet import defer
from twisted.logger import Logger
@@ -176,4 +176,5 @@ class LoginStatusResource(BaseResource):
def render_GET(self, request):
session = IPixelatedSession(request.getSession())
- return format(session.check_login_status())
+ response = {'status': str(session.check_login_status())}
+ return respond_json(response, request)