Skip to content

Commit d9f8695

Browse files
committed
fix: drop default quota field
1 parent fbde84c commit d9f8695

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

mobile/openapi/lib/model/system_config_o_auth_dto.dart

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-api/immich-openapi-specs.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13687,7 +13687,6 @@
1368713687
"defaultStorageQuota": {
1368813688
"format": "int64",
1368913689
"minimum": 0,
13690-
"nullable": true,
1369113690
"type": "integer"
1369213691
},
1369313692
"enabled": {
@@ -13736,7 +13735,6 @@
1373613735
"buttonText",
1373713736
"clientId",
1373813737
"clientSecret",
13739-
"defaultStorageQuota",
1374013738
"enabled",
1374113739
"issuerUrl",
1374213740
"mobileOverrideEnabled",

open-api/typescript-sdk/src/fetch-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ export type SystemConfigOAuthDto = {
13161316
buttonText: string;
13171317
clientId: string;
13181318
clientSecret: string;
1319-
defaultStorageQuota?: number | null;
1319+
defaultStorageQuota?: number;
13201320
enabled: boolean;
13211321
issuerUrl: string;
13221322
mobileOverrideEnabled: boolean;

server/src/config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export interface SystemConfig {
8989
buttonText: string;
9090
clientId: string;
9191
clientSecret: string;
92-
defaultStorageQuota: number | null;
92+
defaultStorageQuota?: number;
9393
enabled: boolean;
9494
issuerUrl: string;
9595
mobileOverrideEnabled: boolean;
@@ -253,7 +253,6 @@ export const defaults = Object.freeze<SystemConfig>({
253253
buttonText: 'Login with OAuth',
254254
clientId: '',
255255
clientSecret: '',
256-
defaultStorageQuota: null,
257256
enabled: false,
258257
issuerUrl: '',
259258
mobileOverrideEnabled: false,

server/src/dtos/system-config.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ class SystemConfigOAuthDto {
360360

361361
@IsNumber()
362362
@Min(0)
363-
@Optional({ nullable: true })
363+
@Optional()
364364
@ApiProperty({ type: 'integer', format: 'int64' })
365-
defaultStorageQuota!: number | null;
365+
defaultStorageQuota?: number;
366366

367367
@ValidateBoolean()
368368
enabled!: boolean;

server/src/services/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class AuthService extends BaseService {
300300
name: userName,
301301
email: profile.email,
302302
oauthId: profile.sub,
303-
quotaSizeInBytes: storageQuota === null ? null : storageQuota * HumanReadableSize.GiB,
303+
quotaSizeInBytes: storageQuota === undefined ? null : storageQuota * HumanReadableSize.GiB,
304304
storageLabel: storageLabel || null,
305305
});
306306
}

server/src/services/system-config.service.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ const updatedConfig = Object.freeze<SystemConfig>({
112112
buttonText: 'Login with OAuth',
113113
clientId: '',
114114
clientSecret: '',
115-
defaultStorageQuota: null,
116115
enabled: false,
117116
issuerUrl: '',
118117
mobileOverrideEnabled: false,

0 commit comments

Comments
 (0)