fixed bot安装列表按安装者分组
This commit is contained in:
parent
e73925ec85
commit
4f87c06976
|
@ -8,7 +8,7 @@ class InstallationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@install_bots = BotInstall.where(bot_id: get_bot_id)
|
@install_bots = BotInstall.where(bot_id: get_bot_id).group(:installer_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -2,7 +2,7 @@ json.status 0
|
||||||
json.message "success"
|
json.message "success"
|
||||||
json.data do
|
json.data do
|
||||||
json.array! @install_bots do |install_bot|
|
json.array! @install_bots do |install_bot|
|
||||||
json.extract! install_bot, :id, :bot_id, :installer_id, :state, :create_time, :update_time
|
json.extract! install_bot, :id, :bot_id, :installer_id
|
||||||
json.bot_name install_bot&.bot&.name
|
json.bot_name install_bot&.bot&.name
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
json.partial! "commons/success"
|
json.partial! "commons/success"
|
||||||
|
|
||||||
json.extract! @install_bot, :id, :bot_id, :installer_id, :state, :create_time, :update_time
|
json.extract! @install_bot, :id, :bot_id, :installer_id
|
||||||
json.bot_name @install_bot&.bot&.name
|
json.bot_name @install_bot&.bot&.name
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue