refactor(server): album count (#2746)

* refactor(server): album count

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-06-16 11:48:48 -04:00
committed by GitHub
parent 441ee2ef90
commit 07f7fffae7
21 changed files with 100 additions and 95 deletions

View File

@@ -47,18 +47,10 @@
const getAlbumCount = async () => {
try {
const { data: albumCount } = await api.albumApi.getAlbumCountByUserId();
return {
shared: albumCount.shared,
sharing: albumCount.sharing,
owned: albumCount.owned
};
const { data: albumCount } = await api.albumApi.getAlbumCount();
return albumCount;
} catch {
return {
shared: 0,
sharing: 0,
owned: 0
};
return { owned: 0, shared: 0, notShared: 0 };
}
};
@@ -133,7 +125,7 @@
<LoadingSpinner />
{:then data}
<div>
<p>{(data.shared + data.sharing).toLocaleString($locale)} Albums</p>
<p>{data.shared.toLocaleString($locale)} Albums</p>
</div>
{/await}
</svelte:fragment>