You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
454 B
22 lines
454 B
5 years ago
|
class BindUsersController < ApplicationController
|
||
|
before_action :require_login
|
||
|
|
||
|
def create
|
||
|
user = CreateBindUserService.call(current_user, create_params)
|
||
|
successful_authentication(user) if user.id != current_user.id
|
||
|
|
||
|
render_ok
|
||
|
rescue ApplicationService::Error => ex
|
||
|
render_error(ex.message)
|
||
|
end
|
||
|
|
||
|
def new_user
|
||
|
current_user
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def create_params
|
||
|
params.permit(:login, :password, :type, :not_bind)
|
||
|
end
|
||
|
end
|