mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
init project
This commit is contained in:
16
app/controllers/users/phone_binds_controller.rb
Normal file
16
app/controllers/users/phone_binds_controller.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class Users::PhoneBindsController < Users::BaseAccountController
|
||||
before_action :private_user_resources!
|
||||
|
||||
def create
|
||||
Users::BindPhoneService.call(observed_user, create_params)
|
||||
render_ok
|
||||
rescue Users::BindPhoneService::Error => ex
|
||||
render_error(ex.message)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def create_params
|
||||
params.permit(:phone, :code)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user