mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Toast on log copy
This commit is contained in:
parent
e741bd5e0a
commit
3a9534c5ba
3 changed files with 5 additions and 8 deletions
|
@ -5,20 +5,14 @@ import { useApi } from 'hooks/useApi';
|
|||
import type { AxiosRequestConfig } from 'axios';
|
||||
|
||||
const fetchServerLog = async (
|
||||
api?: Api,
|
||||
name?: string,
|
||||
api: Api | undefined,
|
||||
name: string,
|
||||
options?: AxiosRequestConfig
|
||||
) => {
|
||||
if (!api) {
|
||||
console.error('[useServerLog] No API instance available');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
console.error('[useServerLog] Name is required');
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await getSystemApi(api).getLogFile({ name }, options);
|
||||
|
||||
// FIXME: TypeScript SDK thinks it is returning a File but in reality it is a string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue