update check keywords

This commit is contained in:
chenjing 2023-09-25 11:40:11 +08:00
parent 892aa31ea9
commit 8d7c114b40
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ class AccountsController < ApplicationController
end
def check_keywords
text = params[:text]&.gsub(/\s+/, "")
text = params[:text].to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
tip_exception("无法使用以下关键词:#{text},请重新命名") if ReversedKeyword.check_exists?(text)
render_ok
end