Use to_json call for accounts API (#38226)

This commit is contained in:
Matt Jankowski
2026-03-16 10:40:03 -04:00
committed by GitHub
parent 7933fa4f94
commit 8ed13bc6f7
2 changed files with 7 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ class Api::V1::AccountsController < Api::BaseController
headers.merge!(response.headers)
self.response_body = Oj.dump(response.body)
self.response_body = response.body.to_json
self.status = response.status
rescue ActiveRecord::RecordInvalid => e
render json: ValidationErrorFormatter.new(e, 'account.username': :username, 'invite_request.text': :reason).as_json, status: 422