新增:用户签署cla字段
This commit is contained in:
parent
e815b0a8ac
commit
881acd2480
|
@ -8,6 +8,11 @@ class Api::V1::UsersController < Api::V1::BaseController
|
|||
render_ok
|
||||
end
|
||||
|
||||
def check_user_login
|
||||
return tip_exception(-1, "用户标识不存在") unless params[:login].present? && User.exists?(login: params[:login])
|
||||
render_ok
|
||||
end
|
||||
|
||||
def send_email_vefify_code
|
||||
code = %W(0 1 2 3 4 5 6 7 8 9)
|
||||
verification_code = code.sample(6).join
|
||||
|
|
|
@ -5,6 +5,7 @@ defaults format: :json do
|
|||
resources :users, only: [:index] do
|
||||
collection do
|
||||
post :check_user_id
|
||||
post :check_user_login
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddSignClaToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :sign_cla, :boolean, default: false
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue