From 2f39bdddd9f76ce9d6a0956620d86a4e070f6c59 Mon Sep 17 00:00:00 2001 From: yujunhui Date: Thu, 26 Dec 2024 17:56:30 +0800 Subject: [PATCH] fix: merge mock success data --- apps/api/src/lib/withAuth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/lib/withAuth.ts b/apps/api/src/lib/withAuth.ts index a585fe0a..bec3d4d1 100644 --- a/apps/api/src/lib/withAuth.ts +++ b/apps/api/src/lib/withAuth.ts @@ -17,7 +17,7 @@ export function withAuth( logger.warn("You're bypassing authentication"); warningCount++; } - return { success: true } as T; + return { success: true, ...(mockSuccess || {}) } as T; } else { return await originalFunction(...args); }