mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): stack info in asset response for mobile (#7346)
* fix(server): stack info in asset response for mobile * fix(server): getAllAssets - do not filter by stack ID * tet(server): GET /assets stack e2e * chore(server): fix checks * stack asset height --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
4c0bb2308c
commit
52dfe5fc92
7 changed files with 37 additions and 24 deletions
|
|
@ -2,7 +2,6 @@ import { AssetSearchBuilderOptions, Paginated, PaginationOptions } from '@app/do
|
|||
import _ from 'lodash';
|
||||
import {
|
||||
Between,
|
||||
Brackets,
|
||||
FindManyOptions,
|
||||
IsNull,
|
||||
LessThanOrEqual,
|
||||
|
|
@ -229,12 +228,7 @@ export function searchAssetBuilder(
|
|||
}
|
||||
|
||||
if (withStacked) {
|
||||
builder
|
||||
.leftJoinAndSelect(`${builder.alias}.stack`, 'stack')
|
||||
.leftJoinAndSelect('stack.assets', 'stackedAssets')
|
||||
.andWhere(
|
||||
new Brackets((qb) => qb.where(`stack.primaryAssetId = ${builder.alias}.id`).orWhere('asset.stackId IS NULL')),
|
||||
);
|
||||
builder.leftJoinAndSelect(`${builder.alias}.stack`, 'stack').leftJoinAndSelect('stack.assets', 'stackedAssets');
|
||||
}
|
||||
|
||||
const withDeleted = options.withDeleted ?? (trashedAfter !== undefined || trashedBefore !== undefined);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue