mirror of
https://github.com/immich-app/immich.git
synced 2025-06-03 05:34:32 -04:00
linting, fix expected response
This commit is contained in:
parent
3ace02b3e7
commit
21bbf2f5e2
@ -149,24 +149,21 @@ describe('/timeline', () => {
|
|||||||
|
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
expect(body).toEqual({
|
expect(body).toEqual({
|
||||||
bucketAssets: {
|
city: [],
|
||||||
city: [],
|
country: [],
|
||||||
country: [],
|
duration: [],
|
||||||
duration: [],
|
id: [],
|
||||||
id: [],
|
isArchived: [],
|
||||||
isArchived: [],
|
isFavorite: [],
|
||||||
isFavorite: [],
|
isImage: [],
|
||||||
isImage: [],
|
isTrashed: [],
|
||||||
isTrashed: [],
|
livePhotoVideoId: [],
|
||||||
livePhotoVideoId: [],
|
localDateTime: [],
|
||||||
localDateTime: [],
|
ownerId: [],
|
||||||
ownerId: [],
|
projectionType: [],
|
||||||
projectionType: [],
|
ratio: [],
|
||||||
ratio: [],
|
status: [],
|
||||||
status: [],
|
thumbhash: [],
|
||||||
thumbhash: [],
|
|
||||||
},
|
|
||||||
hasNextPage: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -189,25 +186,21 @@ describe('/timeline', () => {
|
|||||||
|
|
||||||
expect(status).toBe(200);
|
expect(status).toBe(200);
|
||||||
expect(body).toEqual({
|
expect(body).toEqual({
|
||||||
bucketAssets: {
|
city: [],
|
||||||
city: [],
|
country: [],
|
||||||
country: [],
|
duration: [],
|
||||||
duration: [],
|
id: [],
|
||||||
id: [],
|
isArchived: [],
|
||||||
isArchived: [],
|
isFavorite: [],
|
||||||
isFavorite: [],
|
isImage: [],
|
||||||
isImage: [],
|
isTrashed: [],
|
||||||
isTrashed: [],
|
livePhotoVideoId: [],
|
||||||
isVideo: [],
|
localDateTime: [],
|
||||||
livePhotoVideoId: [],
|
ownerId: [],
|
||||||
localDateTime: [],
|
projectionType: [],
|
||||||
ownerId: [],
|
ratio: [],
|
||||||
projectionType: [],
|
status: [],
|
||||||
ratio: [],
|
thumbhash: [],
|
||||||
status: [],
|
|
||||||
thumbhash: [],
|
|
||||||
},
|
|
||||||
hasNextPage: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -610,12 +610,12 @@ export class AssetRepository {
|
|||||||
eb
|
eb
|
||||||
.case()
|
.case()
|
||||||
.when(sql`exif."exifImageHeight" = 0 or exif."exifImageWidth" = 0`)
|
.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')`)
|
.when('exif.orientation', 'in', sql<string>`('5', '6', '7', '8', '-90', '90')`)
|
||||||
.then(sql`round(exif."exifImageHeight"::numeric / exif."exifImageWidth"::numeric, 3)`)
|
.then(sql`round(exif."exifImageHeight"::numeric / exif."exifImageWidth"::numeric, 3)`)
|
||||||
.else(sql`round(exif."exifImageWidth"::numeric / exif."exifImageHeight"::numeric, 3)`)
|
.else(sql`round(exif."exifImageWidth"::numeric / exif."exifImageHeight"::numeric, 3)`)
|
||||||
.end(),
|
.end(),
|
||||||
eb.lit(1.0),
|
eb.lit(1),
|
||||||
)
|
)
|
||||||
.as('ratio'),
|
.as('ratio'),
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user