Small native API changes: include identity ID, return empty signup completion body

Include identity.id in the my/identity.json response and return an
empty body from the CREATE signup/completions.json endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-02-25 14:21:51 +01:00
committed by Rosa Gutierrez
parent 988dc637da
commit 628a43ef61
4 changed files with 4 additions and 2 deletions
@@ -29,7 +29,7 @@ class Signups::CompletionsController < ApplicationController
redirect_to landing_url(script_name: @signup.account.slug)
end
format.json { render json: { account_id: @signup.account.id }, status: :created }
format.json { head :created }
end
end
@@ -1,3 +1,5 @@
json.id @identity.id
json.accounts @identity.users do |user|
json.partial! "my/identities/account", account: user.account
json.user user, partial: "users/user", as: :user
@@ -11,6 +11,7 @@ class My::IdentitiesControllerTest < ActionDispatch::IntegrationTest
untenanted do
get my_identity_path, as: :json
assert_response :success
assert_equal identity.id, @response.parsed_body["id"]
assert_equal identity.accounts.count, @response.parsed_body["accounts"].count
end
end
@@ -68,7 +68,6 @@ class Signup::CompletionsControllerTest < ActionDispatch::IntegrationTest
end
assert_response :created
assert_equal Account.last.id, @response.parsed_body["account_id"]
end
test "create via JSON with blank name" do