diff options
author | azul <azul@riseup.net> | 2014-04-17 10:12:05 +0200 |
---|---|---|
committer | azul <azul@riseup.net> | 2014-04-17 10:12:05 +0200 |
commit | 3513ad74f950b113af1ba1e3d06bc6a55c48fde5 (patch) | |
tree | db49ebd4428053d5c8d720275b77594a531a1ad1 /users/app/controllers/v1/users_controller.rb | |
parent | cb6442c344d6bdaf52c3878b2de2fcf4d85f2648 (diff) | |
parent | 3d3688647fab7049e5b531c45b85c1e46a1d528f (diff) |
Merge pull request #146 from azul/refactor/engines
Refactor/engines
Diffstat (limited to 'users/app/controllers/v1/users_controller.rb')
-rw-r--r-- | users/app/controllers/v1/users_controller.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/users/app/controllers/v1/users_controller.rb b/users/app/controllers/v1/users_controller.rb deleted file mode 100644 index 8897d01..0000000 --- a/users/app/controllers/v1/users_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -module V1 - class UsersController < UsersBaseController - - skip_before_filter :verify_authenticity_token - before_filter :fetch_user, :only => [:update] - before_filter :require_admin, :only => [:index] - before_filter :require_token, :only => [:update] - - respond_to :json - - # used for autocomplete for admins in the web ui - def index - if params[:query] - @users = User.by_login.startkey(params[:query]).endkey(params[:query].succ) - respond_with @users.map(&:login).sort - else - render :json => {'error' => 'query required', 'status' => :unprocessable_entity} - end - end - - def create - @user = Account.create(params[:user]) - respond_with @user # return ID instead? - end - - def update - @user.account.update params[:user] - respond_with @user - end - - end -end |