成绩查询我总是在最上方
This commit is contained in:
parent
66f8bed978
commit
a262f86100
|
@ -274,6 +274,13 @@ module Mobile
|
|||
get ":course_id/members" do
|
||||
cs = CoursesService.new
|
||||
count = cs.course_members params
|
||||
# 我如果在学生当中,那么我将放在第一位
|
||||
count.each do |m|
|
||||
if m.user.id == current_user.id
|
||||
count.delete m
|
||||
count.unshift m
|
||||
end
|
||||
end
|
||||
present :data, count, with: Mobile::Entities::Member
|
||||
present :status, 0
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue