openapi battle

This commit is contained in:
Min Idzelis
2025-05-03 02:43:06 +00:00
parent 6e8993c6eb
commit bf0be6a655
13 changed files with 182 additions and 316 deletions

View File

@@ -75,20 +75,20 @@ export const toResponseDto = (...timelineAsset: TimelineAsset[]) => {
};
for (const asset of timelineAsset) {
bucketAssets.description.push(asset.description);
bucketAssets.duration.push(asset.duration || 0);
bucketAssets.duration.push(asset.duration);
bucketAssets.id.push(asset.id);
bucketAssets.isArchived.push(asset.isArchived ? 1 : 0);
bucketAssets.isFavorite.push(asset.isFavorite ? 1 : 0);
bucketAssets.isImage.push(asset.isImage ? 1 : 0);
bucketAssets.isTrashed.push(asset.isTrashed ? 1 : 0);
bucketAssets.isVideo.push(asset.isVideo ? 1 : 0);
bucketAssets.livePhotoVideoId.push(asset.livePhotoVideoId || 0);
bucketAssets.livePhotoVideoId.push(asset.livePhotoVideoId);
bucketAssets.localDateTime.push(asset.localDateTime);
bucketAssets.ownerId.push(asset.ownerId);
bucketAssets.projectionType.push(asset.projectionType || 0);
bucketAssets.projectionType.push(asset.projectionType);
bucketAssets.ratio.push(asset.ratio);
bucketAssets.stack.push(asset.stack as TimelineStackResponseDto);
bucketAssets.thumbhash.push(asset.thumbhash || 0);
bucketAssets.thumbhash.push(asset.thumbhash);
}
const response: TimeBucketResponseDto = {
bucketAssets,