You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@warble.apache.org by hu...@apache.org on 2018/06/26 22:05:57 UTC

[incubator-warble-server] 02/05: fix logout

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-warble-server.git

commit 133db5d0dff1229b3ea656e1c0a737dae5b44f07
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Jun 26 16:59:46 2018 -0500

    fix logout
---
 api/pages/session.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/pages/session.py b/api/pages/session.py
index 87f8938..d3f4bde 100644
--- a/api/pages/session.py
+++ b/api/pages/session.py
@@ -159,13 +159,13 @@ def run(API, environ, indata, session):
     
     # Delete a session (log out)
     if method == "DELETE":
-        if self.DB.dbtype == 'sqlite':
+        if session.DB.dbtype == 'sqlite':
             c = self.DB.sqlite.open('sessions.db')
             cur = c.cursor()
             cur.execute("DELETE FROM `sessions` WHERE `cookie` = ? LIMIT 1", (session.cookie,))
             c.commit()
             c.close()
-        elif self.DB.dbtype == 'elasticsearch':
+        elif session.DB.dbtype == 'elasticsearch':
             session.DB.ES.delete(index=session.DB.dbname, doc_type='uisession', id = session.cookie)
         session.newCookie()
         yield json.dumps({"message": "Logged out, bye bye!"})


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@warble.apache.org
For additional commands, e-mail: commits-help@warble.apache.org