mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-07 03:20:19 -06:00
fix ths build
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -34,6 +34,6 @@ export const useApi = (serverUrl: string) => useQuery({
|
||||
export const useServerUrl = () => useQuery({
|
||||
queryKey: [QueryKeys.ServerUrl],
|
||||
queryFn: () => {
|
||||
return fetchServerUrl()
|
||||
return fetchServerUrl
|
||||
}
|
||||
})
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user