Commit 53d99f9e83d074d0748bdf5eb0afa85389ad9fba

Authored by Caio Almeida
1 parent d782d26b

API: removing uncessary code to expose tags

lib/noosfero/api/api.rb
... ... @@ -45,7 +45,6 @@ module Noosfero
45 45 mount V1::Enterprises
46 46 mount V1::Categories
47 47 mount V1::Tasks
48   - mount V1::Tags
49 48 mount V1::Environments
50 49 mount Session
51 50  
... ...
lib/noosfero/api/entities.rb
... ... @@ -114,11 +114,6 @@ module Noosfero
114 114 expose :type
115 115 end
116 116  
117   - class Tag < Entity
118   - root 'tags', 'tag'
119   - expose :name
120   - end
121   -
122 117 class Environment < Entity
123 118 expose :name
124 119 end
... ...
lib/noosfero/api/v1/tags.rb
... ... @@ -10,7 +10,7 @@ module Noosfero
10 10  
11 11 get do
12 12 article = find_article(environment.articles, params[:id])
13   - present article.tag_list, :with => Entities::Tag
  13 + present article.tag_list
14 14 end
15 15  
16 16 desc "Add a tag to an article"
... ... @@ -18,7 +18,7 @@ module Noosfero
18 18 article = find_article(environment.articles, params[:id])
19 19 article.tag_list=params[:tags]
20 20 article.save
21   - present article.tag_list, :with => Entities::Tag
  21 + present article.tag_list
22 22 end
23 23  
24 24 end
... ...