mirror of
https://github.com/immich-app/immich.git
synced 2026-05-21 23:26:31 -04:00
chore!: remove /api/server/theme endpoint (#27880)
chore: remove server/theme endpoint
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
ServerPingResponse,
|
||||
ServerStatsResponseDto,
|
||||
ServerStorageResponseDto,
|
||||
ServerThemeDto,
|
||||
ServerVersionHistoryResponseDto,
|
||||
ServerVersionResponseDto,
|
||||
} from 'src/dtos/server.dto';
|
||||
@@ -104,16 +103,6 @@ export class ServerController {
|
||||
return this.service.getFeatures();
|
||||
}
|
||||
|
||||
@Get('theme')
|
||||
@Endpoint({
|
||||
summary: 'Get theme',
|
||||
description: 'Retrieve the custom CSS, if existent.',
|
||||
history: new HistoryBuilder().added('v1').beta('v1').stable('v2'),
|
||||
})
|
||||
getTheme(): Promise<ServerThemeDto> {
|
||||
return this.service.getTheme();
|
||||
}
|
||||
|
||||
@Get('config')
|
||||
@Endpoint({
|
||||
summary: 'Get config',
|
||||
|
||||
@@ -104,12 +104,6 @@ const ServerMediaTypesResponseSchema = z
|
||||
})
|
||||
.meta({ id: 'ServerMediaTypesResponseDto' });
|
||||
|
||||
const ServerThemeSchema = z
|
||||
.object({
|
||||
customCss: z.string().describe('Custom CSS for theming'),
|
||||
})
|
||||
.meta({ id: 'ServerThemeDto' });
|
||||
|
||||
const ServerConfigSchema = z
|
||||
.object({
|
||||
oauthButtonText: z.string().describe('OAuth button text'),
|
||||
@@ -161,7 +155,6 @@ export class ServerVersionHistoryResponseDto extends createZodDto(ServerVersionH
|
||||
export class UsageByUserDto extends createZodDto(UsageByUserSchema) {}
|
||||
export class ServerStatsResponseDto extends createZodDto(ServerStatsResponseSchema) {}
|
||||
export class ServerMediaTypesResponseDto extends createZodDto(ServerMediaTypesResponseSchema) {}
|
||||
export class ServerThemeDto extends createZodDto(ServerThemeSchema) {}
|
||||
export class ServerConfigDto extends createZodDto(ServerConfigSchema) {}
|
||||
export class ServerFeaturesDto extends createZodDto(ServerFeaturesSchema) {}
|
||||
|
||||
|
||||
@@ -109,11 +109,6 @@ export class ServerService extends BaseService {
|
||||
};
|
||||
}
|
||||
|
||||
async getTheme() {
|
||||
const { theme } = await this.getConfig({ withCache: false });
|
||||
return theme;
|
||||
}
|
||||
|
||||
async getSystemConfig(): Promise<ServerConfigDto> {
|
||||
const { setup } = this.configRepository.getEnv();
|
||||
const config = await this.getConfig({ withCache: false });
|
||||
|
||||
Reference in New Issue
Block a user