This commit is contained in:
24c02 2026-01-30 12:46:01 -05:00
parent aa615790f4
commit 11a5ab331a

View file

@ -42,9 +42,9 @@ class UploadsController < ApplicationController
authorize @upload
@upload.destroy!
redirect_to uploads_path, notice: "Upload deleted successfully."
redirect_back fallback_location: uploads_path, notice: "Upload deleted successfully."
rescue Pundit::NotAuthorizedError
redirect_to uploads_path, alert: "You are not authorized to delete this upload."
redirect_back fallback_location: uploads_path, alert: "You are not authorized to delete this upload."
end
private