Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

put /categories.json

  • Loading branch information...
commit ec0d1909f4fcbe7954d0526390e13de84a0afc49 1 parent a328813
@winton authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/a_b/controller/api.rb
View
15 lib/a_b/controller/api.rb
@@ -44,6 +44,21 @@
end
end
+ put '/categories.json' do
+ content_type :json
+ @user = allow?
+ if @user
+ @category = @user.categories.find_by_id params[:category][:id]
+ if @category.update_attributes(params[:category])
+ @category.to_json
+ else
+ false.to_json
+ end
+ else
+ false.to_json
+ end
+ end
+
post '/envs.json' do
content_type :json
@user = allow?
Please sign in to comment.
Something went wrong with that request. Please try again.