2021-05-17 05:02:59 +00:00
|
|
|
json.call(resource.params, *resource.params.keys)
|
|
|
|
json.name resource.name
|
|
|
|
json.description resource.description
|
|
|
|
json.enabled resource.enabled?(@current_account)
|
2021-05-20 18:33:09 +00:00
|
|
|
json.action resource.action
|
2021-05-17 05:02:59 +00:00
|
|
|
json.button resource.action
|
2021-05-20 15:16:45 +00:00
|
|
|
json.hooks do
|
|
|
|
json.array! @current_account.hooks.where(app_id: resource.id) do |hook|
|
|
|
|
json.partial! 'api/v1/models/hook.json.jbuilder', resource: hook
|
|
|
|
end
|
|
|
|
end
|