diff --git a/mobile/openapi/doc/MemoryLaneResponseDto.md b/mobile/openapi/doc/MemoryLaneResponseDto.md index 102c45f161..54d1a4769a 100644 --- a/mobile/openapi/doc/MemoryLaneResponseDto.md +++ b/mobile/openapi/doc/MemoryLaneResponseDto.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **assets** | [**List**](AssetResponseDto.md) | | [default to const []] **title** | **String** | | -**yearsAgo** | **num** | | +**yearsAgo** | **int** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mobile/openapi/lib/model/memory_lane_response_dto.dart b/mobile/openapi/lib/model/memory_lane_response_dto.dart index 4d6f86fb47..a0df079388 100644 --- a/mobile/openapi/lib/model/memory_lane_response_dto.dart +++ b/mobile/openapi/lib/model/memory_lane_response_dto.dart @@ -22,7 +22,7 @@ class MemoryLaneResponseDto { String title; - num yearsAgo; + int yearsAgo; @override bool operator ==(Object other) => identical(this, other) || other is MemoryLaneResponseDto && @@ -58,7 +58,7 @@ class MemoryLaneResponseDto { return MemoryLaneResponseDto( assets: AssetResponseDto.listFromJson(json[r'assets']), title: mapValueOfType(json, r'title')!, - yearsAgo: num.parse('${json[r'yearsAgo']}'), + yearsAgo: mapValueOfType(json, r'yearsAgo')!, ); } return null; diff --git a/mobile/openapi/test/memory_lane_response_dto_test.dart b/mobile/openapi/test/memory_lane_response_dto_test.dart index 1106ee7d95..4ed84f5ecd 100644 --- a/mobile/openapi/test/memory_lane_response_dto_test.dart +++ b/mobile/openapi/test/memory_lane_response_dto_test.dart @@ -26,7 +26,7 @@ void main() { // TODO }); - // num yearsAgo + // int yearsAgo test('to test the property `yearsAgo`', () async { // TODO }); diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 129b001a8d..c45914319f 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -8431,7 +8431,7 @@ "type": "string" }, "yearsAgo": { - "type": "number" + "type": "integer" } }, "required": [ diff --git a/server/src/dtos/asset-response.dto.ts b/server/src/dtos/asset-response.dto.ts index 59c9b90707..cf16a99a29 100644 --- a/server/src/dtos/asset-response.dto.ts +++ b/server/src/dtos/asset-response.dto.ts @@ -133,7 +133,10 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As export class MemoryLaneResponseDto { @ApiProperty({ deprecated: true }) title!: string; + + @ApiProperty({ type: 'integer' }) yearsAgo!: number; + assets!: AssetResponseDto[]; }