add /users/current method
authorTom Clegg <tom@clinicalfuture.com>
Thu, 31 Jan 2013 23:20:25 +0000 (15:20 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Thu, 31 Jan 2013 23:20:25 +0000 (15:20 -0800)
app/controllers/orvos/v1/users_controller.rb
config/routes.rb

index 57ce13bbb9558c8556a3bf61cf409a04aa6cbcf7..7fc0f47d4989784622bf2615622d508367ac1faa 100644 (file)
@@ -1,2 +1,6 @@
 class Orvos::V1::UsersController < ApplicationController
+  def current
+    @object = current_user
+    show
+  end
 end
index 648297685e9d8d51bf5ee86f33b95822843ce258..a25f86373fdd850c5073ab654aa13e5a62b2d7a2 100644 (file)
@@ -69,6 +69,10 @@ Server::Application.routes.draw do
 
   namespace :orvos do
     namespace :v1 do
+      match '/schema' => 'schema#show'
+      match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
+      match '/links/from/:tail_uuid' => 'links#index', :as => :orvos_v1_links_from
+      match '/users/current' => 'users#current'
       resources :collections
       resources :links
       resources :nodes
@@ -79,9 +83,6 @@ Server::Application.routes.draw do
       resources :projects
       resources :logs
       resources :users
-      match '/schema' => 'schema#show'
-      match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
-      match '/links/:tail_uuid' => 'links#index'
     end
   end