调整Bot授权接口

This commit is contained in:
2023-02-16 09:19:37 +08:00
parent 5e7fe0f28c
commit 6fe16c7c82
2 changed files with 2 additions and 2 deletions

View File

@@ -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?