diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index 688fc7a48..809f3f007 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -2966,10 +2966,10 @@ export interface ServerStatsResponseDto { export interface ServerThemeDto { /** * - * @type {SystemConfigThemeDto} + * @type {string} * @memberof ServerThemeDto */ - 'theme': SystemConfigThemeDto; + 'customCss': string; } /** * diff --git a/mobile/openapi/doc/ServerThemeDto.md b/mobile/openapi/doc/ServerThemeDto.md index d79f55cf3..506f60b79 100644 Binary files a/mobile/openapi/doc/ServerThemeDto.md and b/mobile/openapi/doc/ServerThemeDto.md differ diff --git a/mobile/openapi/lib/model/server_theme_dto.dart b/mobile/openapi/lib/model/server_theme_dto.dart index e803c5880..f31596033 100644 Binary files a/mobile/openapi/lib/model/server_theme_dto.dart and b/mobile/openapi/lib/model/server_theme_dto.dart differ diff --git a/mobile/openapi/test/server_theme_dto_test.dart b/mobile/openapi/test/server_theme_dto_test.dart index c1f63ea49..d340b8f55 100644 Binary files a/mobile/openapi/test/server_theme_dto_test.dart and b/mobile/openapi/test/server_theme_dto_test.dart differ diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index 58e0e3055..d934d50b3 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -7836,12 +7836,12 @@ }, "ServerThemeDto": { "properties": { - "theme": { - "$ref": "#/components/schemas/SystemConfigThemeDto" + "customCss": { + "type": "string" } }, "required": [ - "theme" + "customCss" ], "type": "object" }, diff --git a/server/src/domain/server-info/server-info.dto.ts b/server/src/domain/server-info/server-info.dto.ts index 40a5f3a47..846458223 100644 --- a/server/src/domain/server-info/server-info.dto.ts +++ b/server/src/domain/server-info/server-info.dto.ts @@ -80,9 +80,7 @@ export class ServerMediaTypesResponseDto { sidecar!: string[]; } -export class ServerThemeDto { - theme!: SystemConfigThemeDto; -} +export class ServerThemeDto extends SystemConfigThemeDto {} export class ServerConfigDto { oauthButtonText!: string; diff --git a/server/src/domain/server-info/server-info.service.ts b/server/src/domain/server-info/server-info.service.ts index bb1b22729..f2d312343 100644 --- a/server/src/domain/server-info/server-info.service.ts +++ b/server/src/domain/server-info/server-info.service.ts @@ -72,7 +72,7 @@ export class ServerInfoService { async getTheme() { const { theme } = await this.configCore.getConfig(); - return { theme }; + return theme; } async getConfig(): Promise { diff --git a/server/test/e2e/server-info.e2e-spec.ts b/server/test/e2e/server-info.e2e-spec.ts index 8f776187f..a19c6235e 100644 --- a/server/test/e2e/server-info.e2e-spec.ts +++ b/server/test/e2e/server-info.e2e-spec.ts @@ -161,9 +161,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => { const { status, body } = await request(server).get('/server-info/theme'); expect(status).toBe(200); expect(body).toEqual({ - theme: { - customCss: '', - }, + customCss: '', }); }); }); diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index 688fc7a48..809f3f007 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -2966,10 +2966,10 @@ export interface ServerStatsResponseDto { export interface ServerThemeDto { /** * - * @type {SystemConfigThemeDto} + * @type {string} * @memberof ServerThemeDto */ - 'theme': SystemConfigThemeDto; + 'customCss': string; } /** * diff --git a/web/src/routes/custom.css/+server.ts b/web/src/routes/custom.css/+server.ts index d5ea304cd..e71728f2a 100644 --- a/web/src/routes/custom.css/+server.ts +++ b/web/src/routes/custom.css/+server.ts @@ -1,9 +1,7 @@ import { RequestHandler, text } from '@sveltejs/kit'; export const GET = (async ({ locals: { api } }) => { const { - data: { - theme: { customCss }, - }, + data: { customCss }, } = await api.serverInfoApi.getTheme(); return text(customCss, { headers: {