mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Render enterprise relationships JSON with AMS instead of rabl
This commit is contained in:
@@ -10,7 +10,7 @@ module Admin
|
||||
@enterprise_relationship = EnterpriseRelationship.new params[:enterprise_relationship]
|
||||
|
||||
if @enterprise_relationship.save
|
||||
render partial: "admin/json/enterprise_relationship", locals: {enterprise_relationship: @enterprise_relationship}
|
||||
render text: Api::Admin::EnterpriseRelationshipSerializer.new(@enterprise_relationship).to_json
|
||||
else
|
||||
render status: 400, json: {errors: @enterprise_relationship.errors.full_messages.join(', ')}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user