Browse Source

Merge branch 'standalone_develop' of https://gitlink.org.cn/Trustie/forgeplus into standalone_develop

pull/342/head
yystopf 3 years ago
parent
commit
45bf8daf07
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      app/controllers/installations_controller.rb
  2. +1
    -1
      config/routes.rb

+ 4
- 1
app/controllers/installations_controller.rb View File

@@ -16,7 +16,10 @@ class InstallationsController < ApplicationController
end end


def repositories def repositories
@install_bots = BotInstall.where(:installer_id => current_user.id)
# 与github差异,所以取安装用户和bot对应所有的仓库
install_bot = BotInstall.find params[:id]
bot = Bot.find_by(uid: current_user.id)
@install_bots = BotInstall.where(bot_id: bot.id).where(:installer_id => install_bot.installer_id)
end end


def update_secret def update_secret


+ 1
- 1
config/routes.rb View File

@@ -1080,7 +1080,7 @@ Rails.application.routes.draw do
end end


resources :installations, only: [] do resources :installations, only: [] do
get :repositories, on: :collection
get :repositories, on: :member
end end


root 'main#index' root 'main#index'


Loading…
Cancel
Save