Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

newyslclassrooms
cxt 5 years ago
commit 4d03f190cb

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

Loading…
Cancel
Save