mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix
This commit is contained in:
parent
606d4b66d0
commit
4174575785
@ -335,7 +335,7 @@ with
|
||||
coalesce(array_agg("ratio"), '{}') as "ratio",
|
||||
coalesce(array_agg("status"), '{}') as "status",
|
||||
coalesce(array_agg("thumbhash"), '{}') as "thumbhash",
|
||||
coalesce(array_agg("stack"), '{}') as "stack"
|
||||
coalesce(json_agg("stack"), '[]') as "stack"
|
||||
from
|
||||
"cte"
|
||||
)
|
||||
|
@ -692,7 +692,7 @@ export class AssetRepository {
|
||||
eb.fn.coalesce(eb.fn('array_agg', ['thumbhash']), sql.lit('{}')).as('thumbhash'),
|
||||
])
|
||||
.$if(!!options.withStacked, (qb) =>
|
||||
qb.select((eb) => eb.fn.coalesce(eb.fn('array_agg', ['stack']), sql.lit('{}')).as('stack')),
|
||||
qb.select((eb) => eb.fn.coalesce(eb.fn('json_agg', ['stack']), sql.lit('[]')).as('stack')),
|
||||
),
|
||||
)
|
||||
.selectFrom('agg')
|
||||
|
@ -79,7 +79,7 @@ export const toResponseDto = (...timelineAsset: TimelineAsset[]) => {
|
||||
bucketAssets.ownerId.push(asset.ownerId);
|
||||
bucketAssets.projectionType.push(asset.projectionType!);
|
||||
bucketAssets.ratio.push(asset.ratio);
|
||||
bucketAssets.stack?.push(asset.stack ? [asset.stack.id, asset.stack.assetCount] : null);
|
||||
bucketAssets.stack?.push(asset.stack ? [asset.stack.id, asset.stack.assetCount.toString()] : null);
|
||||
bucketAssets.thumbhash.push(asset.thumbhash!);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user