|
|
|
@ -6,7 +6,7 @@ class Weapps::CoursesController < Weapps::BaseController
|
|
|
|
|
before_action :teacher_or_admin_allowed, only: [:change_member_roles, :delete_course_teachers]
|
|
|
|
|
|
|
|
|
|
def create
|
|
|
|
|
return render_error("只有老师身份才能创建课堂") unless current_user.is_teacher?
|
|
|
|
|
# return render_error("只有老师身份才能创建课堂") unless current_user.is_teacher?
|
|
|
|
|
course = Course.new(tea_id: current_user.id)
|
|
|
|
|
Weapps::CreateCourseService.call(course, course_params)
|
|
|
|
|
render_ok
|
|
|
|
|