Commit bffa55f754f96390b4042f00365ba2409ca27506

Authored by Rodrigo Souto
2 parents e46d23ce bfcb1193

Merge branch 'API-grape' into 'api'

Sort API endpoints for playground

See merge request !620
Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
app/views/api/playground.html.erb
... ... @@ -12,7 +12,11 @@ endpoints.map do |endpoint|
12 12 }
13 13 end
14 14 end
15   -end.flatten.compact.sort{|a,b| a[:path]=='/api/v1/login' ? -1:1}.to_json %>;
  15 +end.flatten.compact.sort{|a,b|
  16 + a[:path]=='/api/v1/login' ? -1 :
  17 + b[:path]=='/api/v1/login' ? 1 :
  18 + a[:path] <=> b[:path]
  19 +}.to_json %>;
16 20 </script>
17 21  
18 22 <form id="api-form">
... ...