Merge d4b9a70304 into 1bb7517da0
commit
c8e604f04c
|
|
@ -51,7 +51,8 @@ from
|
|||
inner join "asset" on "asset"."libraryId" = "library"."id"
|
||||
left join "asset_exif" on "asset_exif"."assetId" = "asset"."id"
|
||||
where
|
||||
"library"."id" = $6
|
||||
"asset"."deletedAt" is null
|
||||
and "library"."id" = $6
|
||||
group by
|
||||
"library"."id"
|
||||
select
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ export class LibraryRepository {
|
|||
.as('videos'),
|
||||
)
|
||||
.select((eb) => eb.fn.coalesce((eb) => eb.fn.sum('asset_exif.fileSizeInByte'), eb.val(0)).as('usage'))
|
||||
.where('asset.deletedAt', 'is', null)
|
||||
.groupBy('library.id')
|
||||
.where('library.id', '=', id)
|
||||
.executeTakeFirst();
|
||||
|
|
|
|||
Loading…
Reference in New Issue