feat(hosts): generate unique 8-digit asset ID
CI / Lint · Typecheck · Test · Build (push) Successful in 1m2s
CI / Playwright (smoke) (push) Has been skipped
CI / Build & push images (push) Successful in 1m21s

Add a Generate button to the host create dialog that fetches a random
8-digit asset ID from the new GET /hosts/generate-asset-id endpoint.
The service retries against the unique index so the returned ID is
guaranteed unused. Edit mode hides the button.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 14:30:24 -04:00
parent 95e501a9c8
commit 0b29e706b0
5 changed files with 59 additions and 5 deletions
+5
View File
@@ -42,3 +42,8 @@ export async function updateHost(id: string, input: UpdateHostRequest): Promise<
export async function deleteHost(id: string): Promise<void> {
await api.delete(`/hosts/${id}`);
}
export async function generateHostAssetId(): Promise<{ assetId: string }> {
const res = await api.get<{ assetId: string }>('/hosts/generate-asset-id');
return res.data;
}