mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
date->string
This commit is contained in:
parent
bf0be6a655
commit
73cd236756
@ -48,7 +48,7 @@ class TimeBucketAssetResponseDto {
|
||||
|
||||
List<String> livePhotoVideoId;
|
||||
|
||||
List<DateTime> localDateTime;
|
||||
List<String> localDateTime;
|
||||
|
||||
List<String> ownerId;
|
||||
|
||||
@ -154,7 +154,9 @@ class TimeBucketAssetResponseDto {
|
||||
livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable
|
||||
? (json[r'livePhotoVideoId'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
localDateTime: DateTime.listFromJson(json[r'localDateTime']),
|
||||
localDateTime: json[r'localDateTime'] is Iterable
|
||||
? (json[r'localDateTime'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
ownerId: json[r'ownerId'] is Iterable
|
||||
? (json[r'ownerId'] as Iterable).cast<String>().toList(growable: false)
|
||||
: const [],
|
||||
|
@ -13627,7 +13627,6 @@
|
||||
"localDateTime": {
|
||||
"default": [],
|
||||
"items": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
|
@ -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)[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user