fix
Some checks failed
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Failing after 16m45s
CI/CD Pipeline / Build and Push App Docker Image (push) Failing after 19m23s
CI/CD Pipeline / Deploy to Kubernetes (push) Has been cancelled

This commit is contained in:
yohlo
2026-02-08 22:32:54 -06:00
parent d1951afb3c
commit a4e618f327
5 changed files with 341 additions and 322 deletions

View File

@@ -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();