Merge branch 'pre_trustie_server' into trustie_server
This commit is contained in:
commit
c6461de871
|
@ -360,6 +360,17 @@ class AccountsController < ApplicationController
|
|||
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
|
||||
|
||||
# type 事件类型 1:用户注册 2:忘记密码 3: 绑定手机 4: 绑定邮箱, 5: 验证手机号是否有效 # 如果有新的继续后面加
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue