fix ths build

This commit is contained in:
Violet Caulfield
2024-10-15 08:18:27 -05:00
parent 0ae02a4673
commit 558edf7bcf
4 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import { fetchServerUrl } from "../queries/functions/storage";
export const authenticateWithCredentials = useMutation({
mutationKey: [MutationKeys.AuthenticationWithCredentials],
mutationFn: async (credentials: JellyfinCredentials) => {
createPublicApi(await fetchServerUrl())
createPublicApi(await fetchServerUrl)
.authenticateUserByName(credentials.username, credentials.password!);
},
onSuccess(data, credentials, context) {

View File

@@ -34,6 +34,6 @@ export const useApi = (serverUrl: string) => useQuery({
export const useServerUrl = () => useQuery({
queryKey: [QueryKeys.ServerUrl],
queryFn: () => {
return fetchServerUrl()
return fetchServerUrl
}
})

View File

@@ -10,7 +10,7 @@ import { createApi } from "./functions/api";
export const useArtistAlbums : (artistId: string) => UseQueryResult<BaseItemDto[], Error> = (artistId: string) => useQuery({
queryKey: [QueryKeys.ArtistAlbums, artistId],
queryFn: async ({ queryKey }) => {
return getItemsApi(await createApi(await fetchServerUrl()))
return getItemsApi(await createApi(await fetchServerUrl))
.getItems({ albumArtistIds: [queryKey[1]] })
.then((result) => {
return result.data.Items

View File

@@ -8,6 +8,6 @@ import { fetchServerUrl } from "./functions/storage";
export const usePlaylists = useQuery({
queryKey: [QueryKeys.Playlists],
queryFn: async () => {
return getPlaylistsApi(await createApi(await fetchServerUrl()))
return getPlaylistsApi(await createApi(await fetchServerUrl))
}
})