Sha256: 44b64ffe9ac1eb3e13417fd69c2110aa4fa7d80287306f95b19c9ad4fa727601

Contents?: true

Size: 675 Bytes

Versions: 8

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

module Overrides
  class RegistrationsController < DeviseJwtAuth::RegistrationsController
    OVERRIDE_PROOF = '(^^,)'

    def update
      if @resource
        if @resource.update(account_update_params)
          render json: {
            status: 'success',
            data: @resource.as_json,
            override_proof: OVERRIDE_PROOF
          }
        else
          render json: {
            status: 'error',
            errors: @resource.errors
          }, status: 422
        end
      else
        render json: {
          status: 'error',
          errors: ['User not found.']
        }, status: 404
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
devise_jwt_auth722-0.1.7 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth7-0.1.7 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.4.1 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.4.0 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.3.0 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.2.0 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.1.7 test/dummy/app/controllers/overrides/registrations_controller.rb
devise_jwt_auth-0.1.6 test/dummy/app/controllers/overrides/registrations_controller.rb