Commit 53a2c9a985c6d4b95fee42c8a462dae3bb67de89
1 parent
4bfa4aaa
Exists in
staging
and in
9 other branches
api: expose accept/reject attributes from task
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
app/api/entities.rb
@@ -267,6 +267,10 @@ module Api | @@ -267,6 +267,10 @@ module Api | ||
267 | expose :status | 267 | expose :status |
268 | expose :created_at | 268 | expose :created_at |
269 | expose :data | 269 | expose :data |
270 | + expose :accept_details | ||
271 | + expose :reject_details | ||
272 | + expose :accept_disabled?, as: :accept_disabled | ||
273 | + expose :reject_disabled?, as: :reject_disabled | ||
270 | expose :target do |task, options| | 274 | expose :target do |task, options| |
271 | type_map = {Profile => ::Profile, Environment => ::Environment}.find {|h| task.target.kind_of?(h.last)} | 275 | type_map = {Profile => ::Profile, Environment => ::Environment}.find {|h| task.target.kind_of?(h.last)} |
272 | type_map.first.represent(task.target) unless type_map.nil? | 276 | type_map.first.represent(task.target) unless type_map.nil? |