chore: code cleanup
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
class Api::V1::Accounts::Integrations::LinearController < Api::V1::Accounts::BaseController
|
||||
before_action :fetch_conversation, only: [:list]
|
||||
# before_action :fetch_conversation, only: [:list]
|
||||
|
||||
def list
|
||||
issues = linear_processor_service.list_issues
|
||||
render json: issues, status: :ok
|
||||
def teams
|
||||
teams = linear_processor_service.teams
|
||||
if teams.is_a?(Hash) && teams[:error]
|
||||
render json: { error: teams[:error] }, status: :unprocessable_entity
|
||||
else
|
||||
render json: teams, status: :ok
|
||||
end
|
||||
end
|
||||
|
||||
def labels
|
||||
team_id = params[:team_id]
|
||||
labels = linear_processor_service.labels(team_id)
|
||||
if labels.is_a?(Hash) && labels[:error]
|
||||
render json: { error: labels[:error] }, status: :unprocessable_entity
|
||||
else
|
||||
render json: labels, status: :ok
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user