fix: Update format in password reset page (#5596)

This commit is contained in:
Tejaswini Chile 2022-10-11 23:57:22 +05:30 committed by GitHub
parent d727093538
commit 2c8ded98aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ class DeviseOverrides::PasswordsController < Devise::PasswordsController
@recoverable = User.find_by(reset_password_token: reset_password_token) @recoverable = User.find_by(reset_password_token: reset_password_token)
if @recoverable && reset_password_and_confirmation(@recoverable) if @recoverable && reset_password_and_confirmation(@recoverable)
send_auth_headers(@recoverable) send_auth_headers(@recoverable)
render partial: 'devise/auth.json', locals: { resource: @recoverable } render partial: 'devise/auth', formats: [:json], locals: { resource: @recoverable }
else else
render json: { message: 'Invalid token', redirect_url: '/' }, status: :unprocessable_entity render json: { message: 'Invalid token', redirect_url: '/' }, status: :unprocessable_entity
end end