删除视频

courseware
daiao 5 years ago
parent 4220be6be0
commit f214cef15a

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

Loading…
Cancel
Save