feat: Add inbox details endpoint (#5549)

This change targets the public API and is related to the Inbox with channel type API.
Exposes public inbox details under /public/api/v1/inboxes/{inbox_identifier}. This allows access to feature flags and business hours configured for the inbox.

ref: #5514
This commit is contained in:
CristianDuta
2022-11-03 03:05:03 +01:00
committed by GitHub
parent 8b659de73d
commit 4c43330b15
9 changed files with 210 additions and 0 deletions

View File

@@ -3,9 +3,15 @@ class Public::Api::V1::InboxesController < PublicController
before_action :set_contact_inbox
before_action :set_conversation
def show
@inbox_channel = ::Channel::Api.find_by!(identifier: params[:id])
end
private
def set_inbox_channel
return if params[:inbox_id].blank?
@inbox_channel = ::Channel::Api.find_by!(identifier: params[:inbox_id])
end