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|
|
2022-10-06 00:24:34 +00:00
|
|
|
json.partial! 'api/v1/models/hook', formats: [:json], resource: hook
|
2021-05-20 15:16:45 +00:00
|
|
|
end
|
|
|
|
end
|