Browse Source

fixed remote_register 增加手机号

pull/348/head
xxq250 1 year ago
parent
commit
e70e8db02d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/accounts_controller.rb

+ 2
- 1
app/controllers/accounts_controller.rb View File

@@ -32,11 +32,12 @@ class AccountsController < ApplicationController
username = params[:username]&.gsub(/\s+/, "")
tip_exception("无法使用以下关键词:#{username},请重新命名") if ReversedKeyword.check_exists?(username)
email = params[:email]&.gsub(/\s+/, "")
phone = params[:phone]&.gsub(/\s+/, "")
password = params[:password]
platform = (params[:platform] || 'forge')&.gsub(/\s+/, "")

ActiveRecord::Base.transaction do
result = autologin_register(username, email, password, platform)
result = autologin_register(username, email, password, platform, phone)
if result[:message].blank?
render_ok({user: result[:user]})
else


Loading…
Cancel
Save