From 6fe16c7c82476059688c445b940e8bfdd1adc9e2 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 16 Feb 2023 09:19:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4Bot=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/installations_controller.rb | 2 +- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/installations_controller.rb b/app/controllers/installations_controller.rb index c8928b51d..0ebc9a3eb 100644 --- a/app/controllers/installations_controller.rb +++ b/app/controllers/installations_controller.rb @@ -6,7 +6,7 @@ class InstallationsController < ApplicationController @install_bots = BotInstall.where(:installer_id => current_user.id) end - def register + def auth_active @bot = Bot.find params[:id] @bot.client_id = Doorkeeper::OAuth::Helpers::UniqueToken.generate if params[:client_id].blank? @bot.client_secret = Doorkeeper::OAuth::Helpers::UniqueToken.generate if params[:client_secret].blank? diff --git a/config/routes.rb b/config/routes.rb index 58c625841..d6e73aebb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1048,7 +1048,7 @@ Rails.application.routes.draw do resources :commit_logs, :only => [:create] scope '/app' do - post 'register', to: 'installations#register' + post 'auth_active', to: 'installations#auth_active' resources :installations do get :repositories, on: :collection member do