From 0676b8d7476acdba638c6ffae5426b8c30f54ba4 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 29 Mar 2018 13:22:00 +0200 Subject: [PATCH] [page.noauth.login] fetch UID from login request --- webpack/page/noauth/login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack/page/noauth/login.js b/webpack/page/noauth/login.js index da17834..cff7b1f 100644 --- a/webpack/page/noauth/login.js +++ b/webpack/page/noauth/login.js @@ -42,13 +42,13 @@ gs.get.login.func.login = function(){ api.call('GET /user/token', {}, function(rs){ // manage error - if( rs.error !== 0 || rs.token == null ) + if( rs.error !== 0 || rs.token == null || rs.uid == null ) return this.failed = true; // store TOKEN + user data auth.token = rs.token; auth.user = { - uid: null, // todo + uid: rs.uid, username: username }; document.location = '';