Avoid http redirects, they will be cached on some browsers.
This commit is contained in:
parent
7d6ab22cae
commit
301688a3cf
1 changed files with 12 additions and 2 deletions
|
@ -212,7 +212,12 @@ class SessionsController < ApplicationController
|
||||||
# set session user
|
# set session user
|
||||||
current_user_set(user)
|
current_user_set(user)
|
||||||
|
|
||||||
redirect_to '/#'
|
render(
|
||||||
|
json: {
|
||||||
|
success: true,
|
||||||
|
location: '',
|
||||||
|
},
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# "switch" back to user
|
# "switch" back to user
|
||||||
|
@ -245,7 +250,12 @@ class SessionsController < ApplicationController
|
||||||
# log end session
|
# log end session
|
||||||
current_session_user.activity_stream_log('ended switch to', user.id, true)
|
current_session_user.activity_stream_log('ended switch to', user.id, true)
|
||||||
|
|
||||||
redirect_to '/#'
|
render(
|
||||||
|
json: {
|
||||||
|
success: true,
|
||||||
|
location: '',
|
||||||
|
},
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def list
|
def list
|
||||||
|
|
Loading…
Reference in a new issue