mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated (#5560)
fixes the warning: Rendering actions with '.' in the name is deprecated
This commit is contained in:
committed by
GitHub
parent
cd4c1ef27e
commit
bd445216e9
@@ -22,7 +22,7 @@ class Api::V1::Accounts::CsatSurveyResponsesController < Api::V1::Accounts::Base
|
||||
def download
|
||||
response.headers['Content-Type'] = 'text/csv'
|
||||
response.headers['Content-Disposition'] = 'attachment; filename=csat_report.csv'
|
||||
render layout: false, template: 'api/v1/accounts/csat_survey_responses/download.csv.erb', format: 'csv'
|
||||
render layout: false, template: 'api/v1/accounts/csat_survey_responses/download', formats: [:csv]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -24,7 +24,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||
).perform
|
||||
if @user
|
||||
send_auth_headers(@user)
|
||||
render 'api/v1/accounts/create.json', locals: { resource: @user }
|
||||
render 'api/v1/accounts/create', format: :json, locals: { resource: @user }
|
||||
else
|
||||
render_error_response(CustomExceptions::Account::SignupFailed.new({}))
|
||||
end
|
||||
@@ -32,7 +32,7 @@ class Api::V1::AccountsController < Api::BaseController
|
||||
|
||||
def show
|
||||
@latest_chatwoot_version = ::Redis::Alfred.get(::Redis::Alfred::LATEST_CHATWOOT_VERSION)
|
||||
render 'api/v1/accounts/show.json'
|
||||
render 'api/v1/accounts/show', format: :json
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -14,22 +14,22 @@ class Api::V2::Accounts::ReportsController < Api::V1::Accounts::BaseController
|
||||
|
||||
def agents
|
||||
@report_data = generate_agents_report
|
||||
generate_csv('agents_report', 'api/v2/accounts/reports/agents.csv.erb')
|
||||
generate_csv('agents_report', 'api/v2/accounts/reports/agents')
|
||||
end
|
||||
|
||||
def inboxes
|
||||
@report_data = generate_inboxes_report
|
||||
generate_csv('inboxes_report', 'api/v2/accounts/reports/inboxes.csv.erb')
|
||||
generate_csv('inboxes_report', 'api/v2/accounts/reports/inboxes')
|
||||
end
|
||||
|
||||
def labels
|
||||
@report_data = generate_labels_report
|
||||
generate_csv('labels_report', 'api/v2/accounts/reports/labels.csv.erb')
|
||||
generate_csv('labels_report', 'api/v2/accounts/reports/labels')
|
||||
end
|
||||
|
||||
def teams
|
||||
@report_data = generate_teams_report
|
||||
generate_csv('teams_report', 'api/v2/accounts/reports/teams.csv.erb')
|
||||
generate_csv('teams_report', 'api/v2/accounts/reports/teams')
|
||||
end
|
||||
|
||||
def conversations
|
||||
@@ -43,7 +43,7 @@ class Api::V2::Accounts::ReportsController < Api::V1::Accounts::BaseController
|
||||
def generate_csv(filename, template)
|
||||
response.headers['Content-Type'] = 'text/csv'
|
||||
response.headers['Content-Disposition'] = "attachment; filename=#{filename}.csv"
|
||||
render layout: false, template: template, format: 'csv'
|
||||
render layout: false, template: template, formats: [:csv]
|
||||
end
|
||||
|
||||
def check_authorization
|
||||
|
||||
Reference in New Issue
Block a user