refactor(server): move asset detail endpoint to new controller (#6636)

* refactor(server): move asset by id to new controller

* chore: open api

* refactor: more consolidation

* refactor: asset service
This commit is contained in:
Jason Rasmussen 2024-01-25 12:52:21 -05:00 committed by GitHub
parent 19d4c5e9f7
commit b306cf564e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 541 additions and 174 deletions

View file

@ -62,7 +62,7 @@
// Get latest description from server
if (newAsset.id && !api.isSharedLink) {
const { data } = await api.assetApi.getAssetById({ id: asset.id });
const { data } = await api.assetApi.getAssetInfo({ id: asset.id });
people = data?.people || [];
description = data.exifInfo?.description || '';
@ -126,7 +126,7 @@
};
const handleRefreshPeople = async () => {
await api.assetApi.getAssetById({ id: asset.id }).then((res) => {
await api.assetApi.getAssetInfo({ id: asset.id }).then((res) => {
people = res.data?.people || [];
textArea.value = res.data?.exifInfo?.description || '';
});
@ -234,7 +234,7 @@
{/key}
</section>
{:else if description}
<p class="break-words whitespace-pre-line w-full text-black dark:text-white text-base">{description}</p>
<p class="px-4 break-words whitespace-pre-line w-full text-black dark:text-white text-base">{description}</p>
{/if}
{#if !api.isSharedLink && people.length > 0}

View file

@ -27,7 +27,7 @@
assetId = link.assets[0].id;
}
const { data } = await api.assetApi.getAssetById({ id: assetId });
const { data } = await api.assetApi.getAssetInfo({ id: assetId });
return data;
};