Commit f7d9d2fb0a49cb5675adc5b44e71e34e960d912a

Authored by Victor Costa
Committed by Rodrigo Souto
1 parent 830e902c

api: pass fields param in article post actions

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
lib/noosfero/api/v1/articles.rb
... ... @@ -62,7 +62,7 @@ module Noosfero
62 62 if !article.save
63 63 render_api_errors!(article.errors.full_messages)
64 64 end
65   - present article, :with => Entities::Article
  65 + present article, :with => Entities::Article, :fields => params[:fields]
66 66 end
67 67  
68 68  
... ... @@ -101,7 +101,7 @@ module Noosfero
101 101 if !article.save
102 102 render_api_errors!(article.errors.full_messages)
103 103 end
104   - present article, :with => Entities::Article
  104 + present article, :with => Entities::Article, :fields => params[:fields]
105 105 end
106 106  
107 107 end
... ... @@ -140,7 +140,7 @@ module Noosfero
140 140 if !article.save
141 141 render_api_errors!(article.errors.full_messages)
142 142 end
143   - present article, :with => Entities::Article
  143 + present article, :with => Entities::Article, :fields => params[:fields]
144 144 end
145 145  
146 146 end
... ... @@ -179,7 +179,7 @@ module Noosfero
179 179 if !article.save
180 180 render_api_errors!(article.errors.full_messages)
181 181 end
182   - present article, :with => Entities::Article
  182 + present article, :with => Entities::Article, :fields => params[:fields]
183 183 end
184 184  
185 185 end
... ...