2018-09-23 15:44:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-02 04:08:16 -04:00
|
|
|
class Profiles::ActiveSessionsController < Profiles::ApplicationController
|
|
|
|
def index
|
2019-02-23 13:18:44 -05:00
|
|
|
@sessions = ActiveSession.list(current_user).reject(&:is_impersonated)
|
2018-05-02 04:08:16 -04:00
|
|
|
end
|
2020-01-03 04:07:33 -05:00
|
|
|
|
|
|
|
def destroy
|
|
|
|
ActiveSession.destroy_with_public_id(current_user, params[:id])
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html { redirect_to profile_active_sessions_url, status: :found }
|
|
|
|
format.js { head :ok }
|
|
|
|
end
|
|
|
|
end
|
2018-05-02 04:08:16 -04:00
|
|
|
end
|