newyslclassrooms
daiao 5 years ago
parent 5177a91b13
commit 68d5c72d8e

@ -57,7 +57,7 @@ class Users::VideosController < Users::BaseController
video = Video.find_by(id: params[:id]) video = Video.find_by(id: params[:id])
return render_forbidden unless video.user_id == current_user.id || current_user.admin_or_business? return render_forbidden unless video.user_id == current_user.id || current_user.admin_or_business?
return render_not_found if video.blank? return render_not_found if video.blank?
return render_error('该状态下不能删除视频') unless video.pending? return render_error('该状态下不能删除视频') unless video.published?
video.destroy! video.destroy!

Loading…
Cancel
Save