Chore: Remove unnessecary check if object exists (#480)
This commit is contained in:
@@ -4,17 +4,11 @@ class Api::V1::InboxMembersController < Api::BaseController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
# update also done via same action
|
# update also done via same action
|
||||||
if @inbox
|
update_agents_list
|
||||||
begin
|
head :ok
|
||||||
update_agents_list
|
rescue StandardError => e
|
||||||
head :ok
|
Rails.logger.debug "Rescued: #{e.inspect}"
|
||||||
rescue StandardError => e
|
render_could_not_create_error('Could not add agents to inbox')
|
||||||
Rails.logger.debug "Rescued: #{e.inspect}"
|
|
||||||
render_could_not_create_error('Could not add agents to inbox')
|
|
||||||
end
|
|
||||||
else
|
|
||||||
render_not_found_error('Agents or inbox not found')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
Reference in New Issue
Block a user