fix
This commit is contained in:
@@ -4,10 +4,12 @@ import { getRequest } from "@tanstack/react-start/server";
|
||||
|
||||
export const serverFnLoggingMiddleware = createMiddleware({
|
||||
type: "function",
|
||||
}).server(async ({ next, data, functionId, context }) => {
|
||||
}).server(async ({ next, data, context }) => {
|
||||
const request = getRequest();
|
||||
|
||||
const serverFnName = functionId.split('--')[1]?.split('_')[0] || 'unknown';
|
||||
const url = new URL(request.url);
|
||||
const pathParts = url.pathname.split('/').filter(Boolean);
|
||||
const serverFnName = pathParts[pathParts.length - 1] || 'unknown';
|
||||
const userId = (context as any)?.metadata?.player_id || 'unknown';
|
||||
|
||||
const startTime = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user