Revision 6f943886
Added by Joseph Magen over 10 years ago
app/controllers/api/v2/tasks_controller.rb | ||
---|---|---|
module V2
|
||
class TasksController < BaseController
|
||
|
||
skip_before_render :get_metadata, :only => :index
|
||
layout false
|
||
|
||
api :GET, '/orchestration/:id/tasks/', 'List all tasks for a given orchestration event'
|
||
|
||
... | ... | |
# cache.fetch returns in JSON format, so convert @tasks back to hash
|
||
@tasks = JSON.parse(Rails.cache.fetch(id))
|
||
not_found if @tasks.blank?
|
||
render :json => { @root_node_name => @tasks }, :layout => false
|
||
render :json => { root_node_name => @tasks }
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #3760 - API v2 define metadata @total for each controller