Merge branch 'develop' into standalone_develop

This commit is contained in:
yystopf 2023-04-19 16:45:24 +08:00
commit 5b7f19bb79
2 changed files with 7 additions and 0 deletions

View File

@ -42,6 +42,12 @@ class Api::V1::UsersController < Api::V1::BaseController
end
end
def check_user_id
id = params[:user_id]
return tip_exception(-1, "用户ID不存在") unless User.exists?(id: id)
render_ok
end
def check_password
password = params[:password]
return tip_exception(-5, "8~16位密码支持字母数字和符号") unless password =~ CustomRegexp::PASSWORD

View File

@ -5,6 +5,7 @@ defaults format: :json do
resource :users, path: '/', only: [:update, :edit, :destroy] do
collection do
get :send_email_vefify_code
post :check_user_id
post :check_password
post :check_email
post :check_email_verify_code