mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
softbot补充和调整接口
This commit is contained in:
4
app/views/installations/app.json.jbuilder
Normal file
4
app/views/installations/app.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.partial! "commons/success"
|
||||
|
||||
json.extract! @bot, :id, :bot_name, :bot_des, :webhook, :is_public, :logo, :state, :web_url, :install_num, :owner_id, :create_time, :update_time
|
||||
|
||||
@@ -4,5 +4,8 @@ json.data do
|
||||
json.array! @install_bots do |install_bot|
|
||||
json.installation_id install_bot.id
|
||||
json.extract! install_bot.bot, :id, :name
|
||||
json.bot_id install_bot.bot.id
|
||||
json.bot_name install_bot.bot.name
|
||||
|
||||
end
|
||||
end
|
||||
15
app/views/installations/repositories.json.jbuilder
Normal file
15
app/views/installations/repositories.json.jbuilder
Normal file
@@ -0,0 +1,15 @@
|
||||
json.status 0
|
||||
json.message "success"
|
||||
json.total_count @install_bots.size
|
||||
json.repositories do
|
||||
json.array! @install_bots do |install_bot|
|
||||
project = Project.find_by(id: install_bot.store_id)
|
||||
if project.present?
|
||||
json.id install_bot.store_id
|
||||
json.url "#{base_url}/#{project.owner.login}/#{project.owner.identifier}.git"
|
||||
json.name project.owner.identifier
|
||||
json.owner_name project.owner.login
|
||||
json.is_public project.is_public
|
||||
end
|
||||
end
|
||||
end
|
||||
5
app/views/installations/show.json.jbuilder
Normal file
5
app/views/installations/show.json.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.partial! "commons/success"
|
||||
|
||||
json.extract! @install_bot, :id, :bot_id, :installer_id, :state, :create_time, :update_time
|
||||
json.bot_name @install_bot.bot.name
|
||||
|
||||
Reference in New Issue
Block a user