Sha256: 158310d8810c36ff2f8d2aaad2d33f3e11ad6e882b711b4ca503e33d028fd7d6
Contents?: true
Size: 1.12 KB
Versions: 17
Compression:
Stored size: 1.12 KB
Contents
module ForemanTasks module Api class RecurringLogicsController < ::Api::V2::BaseController include ::Api::Version2 resource_description do resource_id 'recurring_logics' api_version 'v2' api_base_url '/foreman_tasks/api' end before_filter :find_resource, :only => %w{show cancel destroy} api :GET, '/recurring_logics', N_('List recurring logics') def index @recurring_logics = resource_scope_for_index end api :GET, '/recurring_logics/:id', N_('Show recurring logic details') param :id, :identifier, desc: "ID of the recurring logic", required: true def show end api :POST, '/recurring_logics/:id/cancel', N_('Cancel recurring logic') param :id, :identifier, desc: 'ID of the recurring logic', required: true def cancel process_response @recurring_logic.cancel end def resource_class ForemanTasks::RecurringLogic end def action_permission case params[:action] when 'cancel' 'edit' else super end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems