mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 04:47:57 +03:00
date->string
This commit is contained in:
@@ -99,8 +99,8 @@ export class TimeBucketAssetResponseDto implements TimeBucketAssets {
|
||||
@ApiProperty({ type: [String] })
|
||||
thumbhash: (string | null)[] = [];
|
||||
|
||||
@ApiProperty()
|
||||
localDateTime: Date[] = [];
|
||||
@ApiProperty({ type: [String] })
|
||||
localDateTime: string[] = [];
|
||||
|
||||
@ApiProperty({ type: [String] })
|
||||
duration: (string | null)[] = [];
|
||||
|
||||
@@ -612,6 +612,7 @@ export class AssetRepository {
|
||||
'exif.city as city',
|
||||
'exif.country as country',
|
||||
])
|
||||
.select(sql<string>`to_json("localDateTime" at time zone 'UTC')#>>'{}'`.as('localDateTime'))
|
||||
.$if(!!options.albumId, (qb) =>
|
||||
qb
|
||||
.innerJoin('albums_assets_assets', 'albums_assets_assets.assetsId', 'assets.id')
|
||||
|
||||
@@ -20,7 +20,7 @@ export class TimelineService extends BaseService {
|
||||
async getTimeBuckets(auth: AuthDto, dto: TimeBucketDto): Promise<TimeBucketsResponseDto[]> {
|
||||
await this.timeBucketChecks(auth, dto);
|
||||
const timeBucketOptions = await this.buildTimeBucketOptions(auth, dto);
|
||||
return this.assetRepository.getTimeBuckets(timeBucketOptions);
|
||||
return await this.assetRepository.getTimeBuckets(timeBucketOptions);
|
||||
}
|
||||
|
||||
async getTimeBucket(auth: AuthDto, dto: TimeBucketAssetDto): Promise<TimeBucketResponseDto> {
|
||||
|
||||
@@ -19,7 +19,7 @@ export type TimeBucketAssets = {
|
||||
isVideo: number[];
|
||||
isImage: number[];
|
||||
thumbhash: (string | null)[];
|
||||
localDateTime: Date[];
|
||||
localDateTime: string[];
|
||||
stack: (TimelineStack | null)[];
|
||||
duration: (string | null)[];
|
||||
projectionType: (string | null)[];
|
||||
|
||||
Reference in New Issue
Block a user