mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Return a string on log in/out in the api for json encoding
This commit is contained in:
parent
1e84edbd7f
commit
0a07acfcf2
1 changed files with 2 additions and 2 deletions
|
@ -228,7 +228,7 @@ class _ActionsMapPlugin(object):
|
|||
response.set_cookie('session.id', s_id, secure=True)
|
||||
response.set_cookie('session.hashes', s_hashes, secure=True,
|
||||
secret=s_secret)
|
||||
raise HTTPOKResponse(m18n.g('logged_in'))
|
||||
return m18n.g('logged_in')
|
||||
|
||||
def logout(self, profile=None):
|
||||
"""Log out from an authenticator profile
|
||||
|
@ -250,7 +250,7 @@ class _ActionsMapPlugin(object):
|
|||
# Delete cookie and clean the session
|
||||
response.set_cookie('session.hashes', '', max_age=-1)
|
||||
clean_session(s_id)
|
||||
raise HTTPOKResponse(m18n.g('logged_out'))
|
||||
return m18n.g('logged_out')
|
||||
|
||||
def process(self, _route, arguments={}):
|
||||
"""Process the relevant action for the route
|
||||
|
|
Loading…
Add table
Reference in a new issue