mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Fix formatting
This commit is contained in:
parent
3c3a1bb1a5
commit
ce10c27d7a
2 changed files with 18 additions and 11 deletions
|
|
@ -691,16 +691,19 @@ export class AssetRepository {
|
||||||
eb.fn.coalesce(eb.fn('array_agg', ['duration']), sql.lit('{}')).as('duration'),
|
eb.fn.coalesce(eb.fn('array_agg', ['duration']), sql.lit('{}')).as('duration'),
|
||||||
eb.fn.coalesce(eb.fn('array_agg', ['id']), sql.lit('{}')).as('id'),
|
eb.fn.coalesce(eb.fn('array_agg', ['id']), sql.lit('{}')).as('id'),
|
||||||
eb.fn.coalesce(eb.fn('array_agg', ['visibility']), sql.lit('{}')).as('visibility'),
|
eb.fn.coalesce(eb.fn('array_agg', ['visibility']), sql.lit('{}')).as('visibility'),
|
||||||
eb.fn.coalesce(
|
eb.fn
|
||||||
eb.fn('array_agg', [
|
.coalesce(
|
||||||
eb.case()
|
eb.fn('array_agg', [
|
||||||
.when(eb.ref('ownerId'), '=', auth?.user.id || '')
|
eb
|
||||||
.then(eb.ref('isFavorite'))
|
.case()
|
||||||
.else(sql.lit(false))
|
.when(eb.ref('ownerId'), '=', auth?.user.id || '')
|
||||||
.end()
|
.then(eb.ref('isFavorite'))
|
||||||
]),
|
.else(sql.lit(false))
|
||||||
sql.lit('{}')
|
.end(),
|
||||||
).as('isFavorite'),
|
]),
|
||||||
|
sql.lit('{}'),
|
||||||
|
)
|
||||||
|
.as('isFavorite'),
|
||||||
eb.fn.coalesce(eb.fn('array_agg', ['isImage']), sql.lit('{}')).as('isImage'),
|
eb.fn.coalesce(eb.fn('array_agg', ['isImage']), sql.lit('{}')).as('isImage'),
|
||||||
// TODO: isTrashed is redundant as it will always be all true or false depending on the options
|
// TODO: isTrashed is redundant as it will always be all true or false depending on the options
|
||||||
eb.fn.coalesce(eb.fn('array_agg', ['isTrashed']), sql.lit('{}')).as('isTrashed'),
|
eb.fn.coalesce(eb.fn('array_agg', ['isTrashed']), sql.lit('{}')).as('isTrashed'),
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,11 @@ export class NotificationService extends BaseService {
|
||||||
|
|
||||||
const [asset] = await this.assetRepository.getByIdsWithAllRelationsButStacks([assetId]);
|
const [asset] = await this.assetRepository.getByIdsWithAllRelationsButStacks([assetId]);
|
||||||
if (asset) {
|
if (asset) {
|
||||||
this.eventRepository.clientSend('on_asset_update', userId, mapAsset(asset, { auth: { user: { id: userId } } as AuthDto }));
|
this.eventRepository.clientSend(
|
||||||
|
'on_asset_update',
|
||||||
|
userId,
|
||||||
|
mapAsset(asset, { auth: { user: { id: userId } } as AuthDto }),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue