Class: Api::UsersController

Inherits:
BaseController show all
Includes:
UsersControllerTemplate
Defined in:
app/controllers/api/users_controller.rb

Instance Method Summary collapse

Methods included from OnBaseOrganizationOnly

#ensure_base_organization!

Methods included from Mumuki::Laboratory::Controllers::CurrentOrganization

#organization_name, #set_current_organization!, #visit_organization!

Methods included from WithAuthorization

#authorization_slug, #authorize_janitor!, #authorize_owner!, #protection_slug

Instance Method Details

#createObject



6
7
8
9
10
# File 'app/controllers/api/users_controller.rb', line 6

def create
  @user.save!
  @user.notify!
  render json: @user.as_platform_json
end

#updateObject



12
13
14
15
16
# File 'app/controllers/api/users_controller.rb', line 12

def update
  @user.update! user_params.except([:email, :permissions, :uid])
  @user.notify!
  render json: @user.as_platform_json
end