新增:用户签署cla字段

This commit is contained in:
yystopf 2023-04-20 11:31:34 +08:00
parent e815b0a8ac
commit 881acd2480
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,5 @@
class AddSignClaToUsers < ActiveRecord::Migration[5.2]
def change
add_column :users, :sign_cla, :boolean, default: false
end
end