Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
5b7f19bb79
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue