From 982a9e54572f912fd42d5e6b0c35a97a3f81ddee Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Fri, 12 Dec 2025 20:31:35 +0800 Subject: [PATCH] fix(frontend): log refetch --- frontend/src/components/RequestLogs.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/RequestLogs.tsx b/frontend/src/components/RequestLogs.tsx index 9f34746..631ecb5 100644 --- a/frontend/src/components/RequestLogs.tsx +++ b/frontend/src/components/RequestLogs.tsx @@ -27,12 +27,16 @@ const RequestLogs: Component = () => { return logsApi.list(filters); }, ); - const [allLogs] = createResource(async () => { + const [allLogs, { refetch: refetchAllLogs }] = createResource(async () => { return await logsApi.list(); }); const methods = createMemo(() => { return allLogs.loading ? [] : [...new Set(allLogs()!.map((log) => log.method))]; }); + const refetch = () => { + refetchLogs(); + refetchAllLogs(); + }; const handleLogClick = (log: RequestLogType) => { setSelectedLog(log); @@ -58,7 +62,7 @@ const RequestLogs: Component = () => { -