gitlink-forgeplus/app/views/installations/index.json.jbuilder

16 lines
449 B
Ruby

json.status 0
json.message "success"
json.data do
json.array! @install_bots do |install_bot|
json.extract! install_bot, :id, :bot_id, :installer_id, :create_time, :update_time
json.bot_name install_bot&.bot&.name
json.account do
user = User.find_by(id: install_bot.installer_id)
if user.present?
json.partial! "api/v1/users/simple_user", locals: {user: user}
else
json.nil!
end
end
end
end