Fix favorite mutation

This commit is contained in:
jeffvli 2023-05-13 22:54:24 -07:00
parent 8d5c82b0c6
commit cef92243f5
5 changed files with 123 additions and 59 deletions

View file

@ -241,6 +241,7 @@ export const AlbumDetailContent = ({ tableRef }: AlbumDetailContentProps) => {
id: [detailQuery.data.id],
type: LibraryItem.ALBUM,
},
serverId: detailQuery.data.serverId,
});
} else {
createFavoriteMutation.mutate({
@ -248,6 +249,7 @@ export const AlbumDetailContent = ({ tableRef }: AlbumDetailContentProps) => {
id: [detailQuery.data.id],
type: LibraryItem.ALBUM,
},
serverId: detailQuery.data.serverId,
});
}
};

View file

@ -296,6 +296,7 @@ export const AlbumListContent = ({ itemCount, gridRef, tableRef }: AlbumListCont
id,
type: itemType,
},
serverId: server?.id,
});
} else {
createFavoriteMutation.mutate({
@ -303,6 +304,7 @@ export const AlbumListContent = ({ itemCount, gridRef, tableRef }: AlbumListCont
id,
type: itemType,
},
serverId: server?.id,
});
}
};