调整Bot授权接口,fixed注册信息手机号

This commit is contained in:
xxq250 2023-02-21 16:43:28 +08:00
parent df38df45d5
commit 47a5fe24c8
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class InstallationsController < ApplicationController
# 注册bot对应oauth应用
Doorkeeper::Application.create!(name: @bot.name, uid: @bot.client_id, secret: @bot.client_secret, redirect_uri: "https://gitlink.org.cn")
# 注册bot对应用户
result = autologin_register(User.generate_user_login('b'), nil, "#{SecureRandom.hex(6)}", 'bot', nickname: @bot.name)
result = autologin_register(User.generate_user_login('b'), nil, "#{SecureRandom.hex(6)}", 'bot', nil, nickname: @bot.name)
tip_exception(-1, result[:message]) if result[:message].present?
@bot.uid = result[:user][:id]
@bot.save