updated getBuilder call
This commit is contained in:
parent
6ed43b2778
commit
7e65dcabc1
1 changed files with 4 additions and 4 deletions
|
@ -695,7 +695,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAssetIdByCity(
|
async getAssetIdByCity(
|
||||||
userId: string,
|
ownerId: string,
|
||||||
{ minAssetsPerField, maxFields }: AssetExploreFieldOptions,
|
{ minAssetsPerField, maxFields }: AssetExploreFieldOptions,
|
||||||
): Promise<SearchExploreItem<string>> {
|
): Promise<SearchExploreItem<string>> {
|
||||||
const cte = this.exifRepository
|
const cte = this.exifRepository
|
||||||
|
@ -706,7 +706,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
.orderBy('random()')
|
.orderBy('random()')
|
||||||
.limit(maxFields);
|
.limit(maxFields);
|
||||||
|
|
||||||
const items = await this.getBuilder({ userId, exifInfo: false, assetType: AssetType.IMAGE, isArchived: false })
|
const items = await this.getBuilder({ userIds: [ownerId], exifInfo: false, assetType: AssetType.IMAGE, isArchived: false })
|
||||||
.select('c.city', 'value')
|
.select('c.city', 'value')
|
||||||
.addSelect('asset.id', 'data')
|
.addSelect('asset.id', 'data')
|
||||||
.distinctOn(['c.city'])
|
.distinctOn(['c.city'])
|
||||||
|
@ -720,7 +720,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAssetIdByTag(
|
async getAssetIdByTag(
|
||||||
userId: string,
|
ownerId: string,
|
||||||
{ minAssetsPerField, maxFields }: AssetExploreFieldOptions,
|
{ minAssetsPerField, maxFields }: AssetExploreFieldOptions,
|
||||||
): Promise<SearchExploreItem<string>> {
|
): Promise<SearchExploreItem<string>> {
|
||||||
const cte = this.smartInfoRepository
|
const cte = this.smartInfoRepository
|
||||||
|
@ -731,7 +731,7 @@ export class AssetRepository implements IAssetRepository {
|
||||||
.orderBy('random()')
|
.orderBy('random()')
|
||||||
.limit(maxFields);
|
.limit(maxFields);
|
||||||
|
|
||||||
const items = await this.getBuilder({ userId, exifInfo: false, assetType: AssetType.IMAGE, isArchived: false })
|
const items = await this.getBuilder({ userIds: [ownerId], exifInfo: false, assetType: AssetType.IMAGE, isArchived: false })
|
||||||
.select('unnest(si.tags)', 'value')
|
.select('unnest(si.tags)', 'value')
|
||||||
.addSelect('asset.id', 'data')
|
.addSelect('asset.id', 'data')
|
||||||
.distinctOn(['unnest(si.tags)'])
|
.distinctOn(['unnest(si.tags)'])
|
||||||
|
|
Loading…
Reference in a new issue