mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-07 22:43:19 +00:00
This class inherits from Api::V1::Accounts::BaseController, which already includes EnsureCurrentAccountHelper and also sets up before_action :current_account.
11 lines
303 B
Ruby
11 lines
303 B
Ruby
class Api::V1::Accounts::Conversations::BaseController < Api::V1::Accounts::BaseController
|
|
before_action :conversation
|
|
|
|
private
|
|
|
|
def conversation
|
|
@conversation ||= Current.account.conversations.find_by!(display_id: params[:conversation_id])
|
|
authorize @conversation.inbox, :show?
|
|
end
|
|
end
|