chore: Minor API fixes (#3290)

- Log whether web-hook was successful
- Inbox update shouldn't need channel params
This commit is contained in:
Sojan Jose
2021-10-28 15:26:20 +05:30
committed by GitHub
parent 46867e89cb
commit 69f55a25b6
3 changed files with 11 additions and 5 deletions

View File

@@ -43,7 +43,11 @@ class Api::V1::Accounts::InboxesController < Api::V1::Accounts::BaseController
@inbox.update_working_hours(params.permit(working_hours: Inbox::OFFISABLE_ATTRS)[:working_hours]) if params[:working_hours]
channel_attributes = get_channel_attributes(@inbox.channel_type)
@inbox.channel.update!(permitted_params(channel_attributes)[:channel]) if permitted_params(channel_attributes)[:channel].present?
# Inbox update doesn't necessarily need channel attributes
return if permitted_params(channel_attributes)[:channel].blank?
@inbox.channel.update!(permitted_params(channel_attributes)[:channel])
update_channel_feature_flags
end