Merge pull request #7269 from viown/fix-log-viewer-client-logs

This commit is contained in:
Bill Thornton
2025-10-28 08:01:51 -04:00
committed by GitHub

View File

@@ -12,7 +12,13 @@ const fetchServerLog = async (
const response = await getSystemApi(api).getLogFile({ name }, options);
// FIXME: TypeScript SDK thinks it is returning a File but in reality it is a string
return response.data as never as string;
const data = response.data as never as string | object;
if (typeof data === 'object') {
return JSON.stringify(data, null, 2);
} else {
return data;
}
};
export const useServerLog = (name: string) => {
const { api } = useApi();