You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-08 23:07:06 +02:00
refactor(server): use kysely (#12857)
This commit is contained in:
@ -538,7 +538,7 @@ describe('/asset', () => {
|
||||
expect(body).toMatchObject({
|
||||
id: user1Assets[0].id,
|
||||
exifInfo: expect.objectContaining({
|
||||
dateTimeOriginal: '2023-11-20T01:11:00.000Z',
|
||||
dateTimeOriginal: '2023-11-20T01:11:00+00:00',
|
||||
}),
|
||||
});
|
||||
expect(status).toEqual(200);
|
||||
@ -608,7 +608,7 @@ describe('/asset', () => {
|
||||
await utils.waitForQueueFinish(admin.accessToken, 'metadataExtraction');
|
||||
|
||||
const assetInfo = await utils.getAssetInfo(user1.accessToken, id);
|
||||
expect(assetInfo.exifInfo?.dateTimeOriginal).toBe('2024-07-11T10:32:52.000Z');
|
||||
expect(assetInfo.exifInfo?.dateTimeOriginal).toBe('2024-07-11T10:32:52+00:00');
|
||||
|
||||
const { status, body } = await request(app)
|
||||
.put(`/assets/${id}`)
|
||||
@ -618,7 +618,7 @@ describe('/asset', () => {
|
||||
expect(body).toMatchObject({
|
||||
id,
|
||||
exifInfo: expect.objectContaining({
|
||||
dateTimeOriginal: '2023-11-20T01:11:00.000Z',
|
||||
dateTimeOriginal: '2023-11-20T01:11:00+00:00',
|
||||
}),
|
||||
});
|
||||
expect(status).toEqual(200);
|
||||
@ -985,8 +985,6 @@ describe('/asset', () => {
|
||||
exifImageHeight: 1080,
|
||||
exifImageWidth: 1617,
|
||||
fileSizeInByte: 862_424,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -996,11 +994,9 @@ describe('/asset', () => {
|
||||
type: AssetTypeEnum.Image,
|
||||
originalFileName: 'el_torcal_rocks.jpg',
|
||||
exifInfo: {
|
||||
dateTimeOriginal: '2012-08-05T11:39:59.000Z',
|
||||
dateTimeOriginal: '2012-08-05T11:39:59+00:00',
|
||||
exifImageWidth: 512,
|
||||
exifImageHeight: 341,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
focalLength: 75,
|
||||
iso: 200,
|
||||
fNumber: 11,
|
||||
@ -1008,7 +1004,6 @@ describe('/asset', () => {
|
||||
fileSizeInByte: 53_493,
|
||||
make: 'SONY',
|
||||
model: 'DSLR-A550',
|
||||
orientation: null,
|
||||
description: 'SONY DSC',
|
||||
},
|
||||
},
|
||||
@ -1023,8 +1018,6 @@ describe('/asset', () => {
|
||||
exifImageHeight: 1080,
|
||||
exifImageWidth: 1440,
|
||||
fileSizeInByte: 1_780_777,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1035,7 +1028,7 @@ describe('/asset', () => {
|
||||
originalFileName: 'IMG_2682.heic',
|
||||
fileCreatedAt: '2019-03-21T16:04:22.348Z',
|
||||
exifInfo: {
|
||||
dateTimeOriginal: '2019-03-21T16:04:22.348Z',
|
||||
dateTimeOriginal: '2019-03-21T16:04:22.348+00:00',
|
||||
exifImageWidth: 4032,
|
||||
exifImageHeight: 3024,
|
||||
latitude: 41.2203,
|
||||
@ -1060,8 +1053,6 @@ describe('/asset', () => {
|
||||
exifInfo: {
|
||||
exifImageWidth: 800,
|
||||
exifImageHeight: 800,
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
fileSizeInByte: 25_408,
|
||||
},
|
||||
},
|
||||
@ -1080,9 +1071,7 @@ describe('/asset', () => {
|
||||
focalLength: 18,
|
||||
iso: 100,
|
||||
fileSizeInByte: 9_057_784,
|
||||
dateTimeOriginal: '2010-07-20T17:27:12.000Z',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
dateTimeOriginal: '2010-07-20T17:27:12+00:00',
|
||||
orientation: '1',
|
||||
},
|
||||
},
|
||||
@ -1101,9 +1090,7 @@ describe('/asset', () => {
|
||||
focalLength: 85,
|
||||
iso: 200,
|
||||
fileSizeInByte: 15_856_335,
|
||||
dateTimeOriginal: '2016-09-22T21:10:29.060Z',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
dateTimeOriginal: '2016-09-22T21:10:29.06+00:00',
|
||||
orientation: '1',
|
||||
timeZone: 'UTC-4',
|
||||
},
|
||||
@ -1125,9 +1112,7 @@ describe('/asset', () => {
|
||||
focalLength: 35,
|
||||
iso: 400,
|
||||
fileSizeInByte: 19_587_072,
|
||||
dateTimeOriginal: '2018-05-10T08:42:37.842Z',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
dateTimeOriginal: '2018-05-10T08:42:37.842+00:00',
|
||||
orientation: '1',
|
||||
},
|
||||
},
|
||||
@ -1149,9 +1134,7 @@ describe('/asset', () => {
|
||||
iso: 100,
|
||||
lensModel: 'E PZ 18-105mm F4 G OSS',
|
||||
fileSizeInByte: 25_001_984,
|
||||
dateTimeOriginal: '2016-09-27T10:51:44.000Z',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
dateTimeOriginal: '2016-09-27T10:51:44+00:00',
|
||||
orientation: '1',
|
||||
},
|
||||
},
|
||||
@ -1173,9 +1156,7 @@ describe('/asset', () => {
|
||||
iso: 100,
|
||||
lensModel: 'E 25mm F2',
|
||||
fileSizeInByte: 49_512_448,
|
||||
dateTimeOriginal: '2016-01-08T14:08:01.000Z',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
dateTimeOriginal: '2016-01-08T14:08:01+00:00',
|
||||
orientation: '1',
|
||||
},
|
||||
},
|
||||
@ -1197,7 +1178,7 @@ describe('/asset', () => {
|
||||
iso: 80,
|
||||
lensModel: null,
|
||||
fileSizeInByte: 11_113_617,
|
||||
dateTimeOriginal: '2015-12-27T09:55:40.000Z',
|
||||
dateTimeOriginal: '2015-12-27T09:55:40+00:00',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
orientation: '1',
|
||||
@ -1221,7 +1202,7 @@ describe('/asset', () => {
|
||||
iso: 160,
|
||||
lensModel: null,
|
||||
fileSizeInByte: 13_551_312,
|
||||
dateTimeOriginal: '2024-10-12T21:01:01.000Z',
|
||||
dateTimeOriginal: '2024-10-12T21:01:01+00:00',
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
orientation: '6',
|
||||
@ -1235,7 +1216,7 @@ describe('/asset', () => {
|
||||
originalFileName: 'Ricoh_GR3-450.DNG',
|
||||
fileCreatedAt: '2024-06-08T13:48:39.000Z',
|
||||
exifInfo: {
|
||||
dateTimeOriginal: '2024-06-08T13:48:39.000Z',
|
||||
dateTimeOriginal: '2024-06-08T13:48:39+00:00',
|
||||
exifImageHeight: 4064,
|
||||
exifImageWidth: 6112,
|
||||
exposureTime: '1/400',
|
||||
|
@ -151,7 +151,7 @@ describe('/timeline', () => {
|
||||
it('should require authentication', async () => {
|
||||
const { status, body } = await request(app).get('/timeline/bucket').query({
|
||||
size: TimeBucketSize.Month,
|
||||
timeBucket: '1900-01-01T00:00:00.000Z',
|
||||
timeBucket: '1900-01-01',
|
||||
});
|
||||
|
||||
expect(status).toBe(401);
|
||||
@ -161,7 +161,7 @@ describe('/timeline', () => {
|
||||
it('should handle 5 digit years', async () => {
|
||||
const { status, body } = await request(app)
|
||||
.get('/timeline/bucket')
|
||||
.query({ size: TimeBucketSize.Month, timeBucket: '+012345-01-01T00:00:00.000Z' })
|
||||
.query({ size: TimeBucketSize.Month, timeBucket: '012345-01-01' })
|
||||
.set('Authorization', `Bearer ${timeBucketUser.accessToken}`);
|
||||
|
||||
expect(status).toBe(200);
|
||||
@ -183,7 +183,7 @@ describe('/timeline', () => {
|
||||
const { status, body } = await request(app)
|
||||
.get('/timeline/bucket')
|
||||
.set('Authorization', `Bearer ${timeBucketUser.accessToken}`)
|
||||
.query({ size: TimeBucketSize.Month, timeBucket: '1970-02-10T00:00:00.000Z' });
|
||||
.query({ size: TimeBucketSize.Month, timeBucket: '1970-02-10' });
|
||||
|
||||
expect(status).toBe(200);
|
||||
expect(body).toEqual([]);
|
||||
|
Reference in New Issue
Block a user