编辑课程的时候如果没有输密码,那就用原来的密码
This commit is contained in:
parent
590dd0cac5
commit
d0562f1ede
|
@ -80,6 +80,10 @@ module Mobile
|
|||
class_period: params[:class_period]
|
||||
}
|
||||
course = ::Course.find(params[:course_id])
|
||||
# 如果没有传密码过来,那就把原来的密码给上,不然会不更新
|
||||
if params[:password].nil? || params[:password].blank?
|
||||
cs_params[:course][:password] = course[:password]
|
||||
end
|
||||
cs.edit_course_authorize(current_user,course)
|
||||
course = cs.edit_course(cs_params, course,current_user)
|
||||
present :data, course, with: Mobile::Entities::Course
|
||||
|
|
Loading…
Reference in New Issue