mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 20:55:46 +08:00
check keywords
This commit is contained in:
@@ -359,6 +359,12 @@ class AccountsController < ApplicationController
|
|||||||
Register::LoginCheckColumnsForm.new(check_params.merge(user: current_user)).validate!
|
Register::LoginCheckColumnsForm.new(check_params.merge(user: current_user)).validate!
|
||||||
render_ok
|
render_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_keywords
|
||||||
|
text = params[:text]&.gsub(/\s+/, "")
|
||||||
|
tip_exception("无法使用以下关键词:#{text},请重新命名") if ReversedKeyword.check_exists?(text)
|
||||||
|
render_ok
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|||||||
@@ -261,6 +261,7 @@ Rails.application.routes.draw do
|
|||||||
post :remote_password
|
post :remote_password
|
||||||
post :change_password
|
post :change_password
|
||||||
post :check
|
post :check
|
||||||
|
post :check_keywords
|
||||||
post :login_check
|
post :login_check
|
||||||
post :simple_update
|
post :simple_update
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user