Merge pull request '根据前端要求调整检测敏感词接口返回内容' (#140) from KingChan/forgeplus:chenjing into standalone_develop
This commit is contained in:
commit
35ca53c202
|
@ -362,8 +362,13 @@ class AccountsController < ApplicationController
|
||||||
|
|
||||||
def check_keywords
|
def check_keywords
|
||||||
text = params[:text].to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
|
text = params[:text].to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
|
||||||
tip_exception("无法使用以下关键词:#{text},请重新命名") if ReversedKeyword.check_exists?(text)
|
data = ReversedKeyword.check_exists?(text)
|
||||||
render_ok
|
result = {
|
||||||
|
status: 0,
|
||||||
|
data: data,
|
||||||
|
message: data ? "" : "无法使用以下关键词:#{text},请重新命名"
|
||||||
|
}
|
||||||
|
render_ok(result)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue