课程搜索接口无法搜到自己的私有课程问题
This commit is contained in:
parent
9d686349da
commit
28a61c2617
|
@ -38,7 +38,7 @@ class CoursesService
|
|||
if name.blank?
|
||||
raise 'sumbit empty'
|
||||
end
|
||||
@courses = courses_all.visible
|
||||
@courses = courses_all.visible(current_user)
|
||||
if params[:name].present?
|
||||
@courses_all = @courses.like(params[:name])
|
||||
else
|
||||
|
|
|
@ -193,7 +193,6 @@ class UsersService
|
|||
@current_user.save
|
||||
#raise @current_user.errors.full_message
|
||||
#return @current_user
|
||||
|
||||
else
|
||||
raise 'wrong password'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue