Save deleted_by user when deleting products

This commit is contained in:
David Cook
2024-05-02 12:05:40 +10:00
parent 20b1a40fca
commit a38f22fbee
6 changed files with 20 additions and 2 deletions

View File

@@ -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