From aa95200177f42de39a102a559713bde13dedb30d Mon Sep 17 00:00:00 2001 From: KIRAN KASHALKAR Date: Mon, 27 Mar 2017 09:53:47 -0400 Subject: [PATCH] NOTICKET: resolving with full response in session.delete now Signed-off-by: KIRAN KASHALKAR --- skyquake/framework/core/modules/api/sessions.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/skyquake/framework/core/modules/api/sessions.js b/skyquake/framework/core/modules/api/sessions.js index c8a02239c..2f5ace3dd 100644 --- a/skyquake/framework/core/modules/api/sessions.js +++ b/skyquake/framework/core/modules/api/sessions.js @@ -42,7 +42,7 @@ function logAndReject(mesg, reject) { function logAndRedirectToLogin(mesg, res, req) { console.log(mesg); - res.render('login.html?api_server=' + req.query['api_server']); + res.redirect('login.html?api_server=' + req.query['api_server']); res.end(); } @@ -153,8 +153,6 @@ sessionsAPI.addProjectToSession = function(req, res) { } sessionsAPI.delete = function(req, res) { - var reqRef = req; - var res = res; var api_server = req.query["api_server"]; var uri = utils.confdPort(api_server); var url = uri + '/api/logout'; @@ -167,7 +165,8 @@ sessionsAPI.delete = function(req, res) { 'Authorization': req.session.authorization }), forever: constants.FOREVER_ON, - rejectUnauthorized: constants.REJECT_UNAUTHORIZED + rejectUnauthorized: constants.REJECT_UNAUTHORIZED, + resolveWithFullResponse: true }), new Promise(function(success, failure) { req.session.destroy(function(err) { -- 2.25.1