Skip to content

Commit 02ffdd6

Browse files
committed
fix error
1 parent 95406df commit 02ffdd6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ui/src/api/statesman_serverFunctions.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ export const getUnitStatusFn = createServerFn({method: 'GET'})
7777

7878
export const createUnitFn = createServerFn({method: 'POST'})
7979
.inputValidator((data : {userId: string, organisationId: string, email: string, name: string, requestId?: string}) => data)
80-
.handler(async ({ data, context }) => {
81-
// Use client-provided requestId, or fall back to HTTP header, or generate one
82-
const httpRequestId = context?.request?.headers?.get?.('x-request-id');
83-
const requestId = data.requestId || httpRequestId || `unit-${Date.now()}-server`;
80+
.handler(async ({ data }) => {
81+
// Use client-provided requestId, or generate one
82+
const requestId = data.requestId || `unit-${Date.now()}-server`;
8483
const startServerFn = Date.now();
8584

8685
console.log(`[${requestId}] 🔷 SERVER_FN: Received create unit request for "${data.name}" (org: ${data.organisationId})`);

0 commit comments

Comments
 (0)