diff --git a/furniture-3d-system/src/app/api/installation-demo-workbench/share/route.ts b/furniture-3d-system/src/app/api/installation-demo-workbench/share/route.ts index 78e4b65d..43cfe07b 100644 --- a/furniture-3d-system/src/app/api/installation-demo-workbench/share/route.ts +++ b/furniture-3d-system/src/app/api/installation-demo-workbench/share/route.ts @@ -2,6 +2,7 @@ import { NextRequest } from 'next/server' import { AppError } from '@/server/core/errors' import { handleRequest, jsonError, jsonSuccess } from '@/server/core/response' import { installationDemoShareService } from '@/server/services' +import { buildInstallationDemoShareUrl } from './share-url' export async function POST(request: NextRequest) { return handleRequest( @@ -14,7 +15,7 @@ export async function POST(request: NextRequest) { { share: { token: snapshot.token, - url: `${request.nextUrl.origin}/installation-demo-share/${snapshot.token}`, + url: buildInstallationDemoShareUrl(snapshot.token, request.nextUrl.origin), expiresAt: snapshot.expiresAt, snapshot, },