[Git][noosfero/noosfero][api] 2 commits: Sort API endpoints for playground

Rodrigo Souto gitlab at gitlab.com
Mon Jul 13 10:43:07 BRT 2015


Rodrigo Souto pushed to branch api at Noosfero / noosfero


Commits:
bfcb1193 by Aurélio A. Heckert at 2015-07-10T17:41:08Z
Sort API endpoints for playground

- - - - -
bffa55f7 by Rodrigo Souto at 2015-07-13T13:42:54Z
Merge branch 'API-grape' into 'api'

Sort API endpoints for playground

See merge request !620

- - - - -


1 changed file:

- app/views/api/playground.html.erb


Changes:

=====================================
app/views/api/playground.html.erb
=====================================
--- a/app/views/api/playground.html.erb
+++ b/app/views/api/playground.html.erb
@@ -12,7 +12,11 @@ endpoints.map do |endpoint|
       }
     end
   end
-end.flatten.compact.sort{|a,b| a[:path]=='/api/v1/login' ? -1:1}.to_json %>;
+end.flatten.compact.sort{|a,b|
+  a[:path]=='/api/v1/login' ? -1 :
+  b[:path]=='/api/v1/login' ?  1 :
+  a[:path] <=> b[:path]
+}.to_json %>;
 </script>
 
 <form id="api-form">



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/e46d23ce9ab2d42db5119253b039f871e1dbef19...bffa55f754f96390b4042f00365ba2409ca27506
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150713/251ce4ad/attachment.html>


More information about the Noosfero-dev mailing list