FIX: do not request refresh on 'log out all' request

This commit is contained in:
Arpit Jalan 2019-07-19 16:24:58 +05:30
parent 30c491500a
commit 2f6ce29736

View File

@ -1224,12 +1224,12 @@ class UsersController < ApplicationController
# The user should not be able to revoke the auth token of current session.
raise Discourse::InvalidParameters.new(:token_id) if guardian.auth_token == token.auth_token
UserAuthToken.where(id: params[:token_id], user_id: user.id).each(&:destroy!)
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
else
UserAuthToken.where(user_id: user.id).each(&:destroy!)
end
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]
render json: success_json
end