newyslclassrooms
daiao 5 years ago
parent 59e2321c66
commit aa2ceb4817

@ -54,7 +54,7 @@ class Users::VideosController < Users::BaseController
end end
def destroy def destroy
video = Video.find_by(id: params[:video_id]) video = Video.find_by(id: params[:id])
render_forbidden unless video.user_id != observed_user.id || !current_user.admin_or_business? render_forbidden unless video.user_id != observed_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.pending?

Loading…
Cancel
Save