linting, fix expected response

This commit is contained in:
mertalev
2025-05-05 10:03:20 -04:00
parent 3ace02b3e7
commit 21bbf2f5e2
2 changed files with 32 additions and 39 deletions
-7
View File
@@ -149,7 +149,6 @@ describe('/timeline', () => {
expect(status).toBe(200);
expect(body).toEqual({
bucketAssets: {
city: [],
country: [],
duration: [],
@@ -165,8 +164,6 @@ describe('/timeline', () => {
ratio: [],
status: [],
thumbhash: [],
},
hasNextPage: false,
});
});
@@ -189,7 +186,6 @@ describe('/timeline', () => {
expect(status).toBe(200);
expect(body).toEqual({
bucketAssets: {
city: [],
country: [],
duration: [],
@@ -198,7 +194,6 @@ describe('/timeline', () => {
isFavorite: [],
isImage: [],
isTrashed: [],
isVideo: [],
livePhotoVideoId: [],
localDateTime: [],
ownerId: [],
@@ -206,8 +201,6 @@ describe('/timeline', () => {
ratio: [],
status: [],
thumbhash: [],
},
hasNextPage: false,
});
});
});
+2 -2
View File
@@ -610,12 +610,12 @@ export class AssetRepository {
eb
.case()
.when(sql`exif."exifImageHeight" = 0 or exif."exifImageWidth" = 0`)
.then(eb.lit(1.0))
.then(eb.lit(1))
.when('exif.orientation', 'in', sql<string>`('5', '6', '7', '8', '-90', '90')`)
.then(sql`round(exif."exifImageHeight"::numeric / exif."exifImageWidth"::numeric, 3)`)
.else(sql`round(exif."exifImageWidth"::numeric / exif."exifImageHeight"::numeric, 3)`)
.end(),
eb.lit(1.0),
eb.lit(1),
)
.as('ratio'),
])