Commit bfcb1193ab3aa31a56196d5165bbc69b2ad8e517
1 parent
e46d23ce
Exists in
api_private_token
and in
2 other branches
Sort API endpoints for playground
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"> | ... | ... |