Merge pull request '关键词检测接口' (#138) from KingChan/forgeplus:chenjing into standalone_develop

This commit is contained in:
KingChan 2023-09-25 11:31:33 +08:00
commit 7b3dbfd9ab
2 changed files with 7 additions and 0 deletions

View File

@ -360,6 +360,12 @@ class AccountsController < ApplicationController
render_ok
end
def check_keywords
text = params[:text]&.gsub(/\s+/, "")
tip_exception("无法使用以下关键词:#{text},请重新命名") if ReversedKeyword.check_exists?(text)
render_ok
end
private
# type 事件类型 1用户注册 2忘记密码 3: 绑定手机 4: 绑定邮箱, 5: 验证手机号是否有效 # 如果有新的继续后面加

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