chore: cleanup code

This commit is contained in:
Muhsin Keloth
2024-05-07 14:19:34 +05:30
parent 3595903fb5
commit ee184d9792
4 changed files with 12 additions and 22 deletions
@@ -1,6 +1,4 @@
class Api::V1::Accounts::Integrations::LinearController < Api::V1::Accounts::BaseController
# before_action :fetch_conversation, only: [:list]
def teams
teams = linear_processor_service.teams
if teams.is_a?(Hash) && teams[:error]
@@ -23,14 +21,10 @@ class Api::V1::Accounts::Integrations::LinearController < Api::V1::Accounts::Bas
private
def linear_processor_service
Integrations::Linear::ProcessorService.new(account: Current.account, conversation: @conversation)
Integrations::Linear::ProcessorService.new(account: Current.account)
end
def permitted_params
params.permit(:conversation_id)
end
def fetch_conversation
@conversation = Current.account.conversations.find_by!(display_id: permitted_params[:conversation_id])
end
end