fix(server): proper asset sync ()

* fix(server,mobile): proper asset sync

* fix CI issues

* only use id instead of createdAt+id

* remove createdAt index

* fix typo

* cleanup createdAt usage

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Fynn Petersen-Frey 2024-06-09 21:19:28 +02:00 committed by GitHub
parent 69795a3763
commit 972c66d467
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 38 additions and 121 deletions
server/src/dtos

View file

@ -127,10 +127,10 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
stackParentId: withStack ? entity.stack?.primaryAssetId : undefined,
stack: withStack
? entity.stack?.assets
.filter((a) => a.id !== entity.stack?.primaryAssetId)
.map((a) => mapAsset(a, { stripMetadata, auth: options.auth }))
?.filter((a) => a.id !== entity.stack?.primaryAssetId)
?.map((a) => mapAsset(a, { stripMetadata, auth: options.auth }))
: undefined,
stackCount: entity.stack?.assets?.length ?? null,
stackCount: entity.stack?.assetCount ?? entity.stack?.assets?.length ?? null,
isOffline: entity.isOffline,
hasMetadata: true,
duplicateId: entity.duplicateId,