mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-09 07:56:58 +00:00
Save deleted_by user when deleting products
This commit is contained in:
@@ -42,7 +42,7 @@ module Api
|
||||
authorize! :delete, Spree::Product
|
||||
@product = product_finder.find_product
|
||||
authorize! :delete, @product
|
||||
@product.destroy
|
||||
@product.destroy(deleted_by: current_api_user)
|
||||
render json: @product, serializer: Api::Admin::ProductSerializer, status: :no_content
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user