Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(server): use kysely #12857

Merged
merged 12 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 13 additions & 32 deletions e2e/src/api/specs/asset.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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}`)
Expand All @@ -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);
Expand Down Expand Up @@ -985,8 +985,6 @@ describe('/asset', () => {
exifImageHeight: 1080,
exifImageWidth: 1617,
fileSizeInByte: 862_424,
latitude: null,
longitude: null,
},
},
},
Expand All @@ -996,19 +994,16 @@ 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,
exposureTime: '1/160',
fileSizeInByte: 53_493,
make: 'SONY',
model: 'DSLR-A550',
orientation: null,
description: 'SONY DSC',
},
},
Expand All @@ -1023,8 +1018,6 @@ describe('/asset', () => {
exifImageHeight: 1080,
exifImageWidth: 1440,
fileSizeInByte: 1_780_777,
latitude: null,
longitude: null,
},
},
},
Expand All @@ -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,
Expand All @@ -1060,8 +1053,6 @@ describe('/asset', () => {
exifInfo: {
exifImageWidth: 800,
exifImageHeight: 800,
latitude: null,
longitude: null,
fileSizeInByte: 25_408,
},
},
Expand All @@ -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',
},
},
Expand All @@ -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',
},
Expand All @@ -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',
},
},
Expand All @@ -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',
},
},
Expand All @@ -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',
},
},
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/api/specs/timeline.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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([]);
Expand Down
18 changes: 4 additions & 14 deletions mobile/openapi/lib/model/metadata_search_dto.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10000,7 +10000,8 @@
{
"$ref": "#/components/schemas/AssetOrder"
}
]
],
"default": "desc"
},
"originalFileName": {
"type": "string"
Expand Down
Loading
Loading