wedding-planner/app/controllers/users/confirmations_controller.rb
Manuel Bustillo 598cb553c9
All checks were successful
Check usage of free licenses / check-licenses (pull_request) Successful in 1m6s
Add copyright notice / copyright_notice (pull_request) Successful in 2m5s
Run unit tests / unit_tests (pull_request) Successful in 3m9s
Add copyright notice
2024-11-30 17:47:30 +00:00

20 lines
458 B
Ruby

# Copyright (C) 2024 Manuel Bustillo
class Users::ConfirmationsController < Devise::ConfirmationsController
clear_respond_to
respond_to :json
def show
super do |resource|
if resource.errors.empty?
render json: resource, status: :ok
else
render json: {
message: 'Record invalid',
errors: resource.errors.full_messages
}, status: :unprocessable_entity
end
return
end
end
end