Sha256: e4940bdd8fcddc361304cc7d2f512cce3dce850b86680b791ae78f92fbb7760c

Contents?: true

Size: 670 Bytes

Versions: 16

Compression:

Stored size: 670 Bytes

Contents

module Workarea
  module Api
    module Storefront
      class AccountsController < Api::Storefront::ApplicationController
        def show
        end

        def create
          @user = User.create!(user_params)

          Workarea::Storefront::AccountMailer
            .creation(@user.id.to_s)
            .deliver_later

          @authentication_token = @user.authentication_tokens.create!
        end

        def update
          current_user.update_attributes!(user_params)
          render :show
        end

        private

        def user_params
          params.permit(:email, :password, :first_name, :last_name)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
workarea-api-4.5.6 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.6 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.5.5 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.5 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.5.4 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.4 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.5.3 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.3 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.5.2 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.2 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.5.0 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.5.0 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.4.7 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.4.7 app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-4.4.6 storefront/app/controllers/workarea/api/storefront/accounts_controller.rb
workarea-api-storefront-4.4.6 app/controllers/workarea/api/storefront/accounts_controller.rb