mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Rename to useServerLogs
This commit is contained in:
parent
e08de5175d
commit
da31c9856c
2 changed files with 5 additions and 5 deletions
|
@ -4,7 +4,7 @@ import { useQuery } from '@tanstack/react-query';
|
|||
import { useApi } from 'hooks/useApi';
|
||||
import type { AxiosRequestConfig } from 'axios';
|
||||
|
||||
const fetchLogEntries = async (api?: Api, options?: AxiosRequestConfig) => {
|
||||
const fetchServerLogs = async (api?: Api, options?: AxiosRequestConfig) => {
|
||||
if (!api) {
|
||||
console.error('[useLogEntries] No API instance available');
|
||||
return;
|
||||
|
@ -15,12 +15,12 @@ const fetchLogEntries = async (api?: Api, options?: AxiosRequestConfig) => {
|
|||
return response.data;
|
||||
};
|
||||
|
||||
export const useLogEntries = () => {
|
||||
export const useServerLogs = () => {
|
||||
const { api } = useApi();
|
||||
|
||||
return useQuery({
|
||||
queryKey: [ 'LogEntries' ],
|
||||
queryFn: ({ signal }) => fetchLogEntries(api, { signal }),
|
||||
queryFn: ({ signal }) => fetchServerLogs(api, { signal }),
|
||||
enabled: !!api
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue