Merge branch 'pre_trustie_server' into trustie_server

This commit is contained in:
xxq250 2023-09-25 17:58:15 +08:00
commit c6461de871
2 changed files with 12 additions and 0 deletions

View File

@ -359,6 +359,17 @@ class AccountsController < ApplicationController
Register::LoginCheckColumnsForm.new(check_params.merge(user: current_user)).validate!
render_ok
end
def check_keywords
text = params[:text].to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
data = ! ReversedKeyword.check_exists?(text)
result = {
status: 0,
data: data,
message: data ? "" : "无法使用以下关键词:#{text},请重新命名"
}
render_ok(result)
end
private

View File

@ -261,6 +261,7 @@ Rails.application.routes.draw do
post :remote_password
post :change_password
post :check
post :check_keywords
post :login_check
post :simple_update
end