From abaec8c1156475b0d77bbc5243de0b023c981d4f Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 29 Mar 2023 14:22:11 +0800 Subject: [PATCH] =?UTF-8?q?softbot=E8=A1=A5=E5=85=85=E5=92=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/installations/app.json.jbuilder | 5 +++-- app/views/installations/repositories.json.jbuilder | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/installations/app.json.jbuilder b/app/views/installations/app.json.jbuilder index cc738e6b9..598cd1725 100644 --- a/app/views/installations/app.json.jbuilder +++ b/app/views/installations/app.json.jbuilder @@ -1,4 +1,5 @@ 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 +if @bot.present? + json.extract! @bot, :id, :bot_name, :bot_des, :webhook, :is_public, :logo, :state, :web_url, :install_num, :owner_id, :create_time, :update_time +end diff --git a/app/views/installations/repositories.json.jbuilder b/app/views/installations/repositories.json.jbuilder index 01e873378..6d17f2770 100644 --- a/app/views/installations/repositories.json.jbuilder +++ b/app/views/installations/repositories.json.jbuilder @@ -6,8 +6,10 @@ json.repositories do 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.url "#{base_url}/#{project.owner.login}/#{project.identifier}.git" + json.identifier project.identifier + json.name project.name + json.description Nokogiri::HTML(project.description).text json.owner_name project.owner.login json.is_public project.is_public end