mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 09:13:15 +03:00
refactor(server): controller cleanup (#11923)
chore(server): controller cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Body, Controller, Delete, Get, Put } from '@nestjs/common';
|
||||
import { ApiExcludeEndpoint, ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto';
|
||||
import {
|
||||
ServerAboutResponseDto,
|
||||
@@ -26,57 +26,48 @@ export class ServerController {
|
||||
|
||||
@Get('about')
|
||||
@Authenticated()
|
||||
@ApiExcludeEndpoint()
|
||||
getAboutInfo(): Promise<ServerAboutResponseDto> {
|
||||
return this.service.getAboutInfo();
|
||||
}
|
||||
|
||||
@Get('storage')
|
||||
@Authenticated()
|
||||
@ApiExcludeEndpoint()
|
||||
getStorage(): Promise<ServerStorageResponseDto> {
|
||||
return this.service.getStorage();
|
||||
}
|
||||
|
||||
@Get('ping')
|
||||
@ApiExcludeEndpoint()
|
||||
pingServer(): ServerPingResponse {
|
||||
return this.service.ping();
|
||||
}
|
||||
|
||||
@Get('version')
|
||||
@ApiExcludeEndpoint()
|
||||
getServerVersion(): ServerVersionResponseDto {
|
||||
return this.versionService.getVersion();
|
||||
}
|
||||
|
||||
@Get('features')
|
||||
@ApiExcludeEndpoint()
|
||||
getServerFeatures(): Promise<ServerFeaturesDto> {
|
||||
return this.service.getFeatures();
|
||||
}
|
||||
|
||||
@Get('theme')
|
||||
@ApiExcludeEndpoint()
|
||||
getTheme(): Promise<ServerThemeDto> {
|
||||
return this.service.getTheme();
|
||||
}
|
||||
|
||||
@Get('config')
|
||||
@ApiExcludeEndpoint()
|
||||
getServerConfig(): Promise<ServerConfigDto> {
|
||||
return this.service.getConfig();
|
||||
}
|
||||
|
||||
@Authenticated({ admin: true })
|
||||
@Get('statistics')
|
||||
@ApiExcludeEndpoint()
|
||||
@Authenticated({ admin: true })
|
||||
getServerStatistics(): Promise<ServerStatsResponseDto> {
|
||||
return this.service.getStatistics();
|
||||
}
|
||||
|
||||
@Get('media-types')
|
||||
@ApiExcludeEndpoint()
|
||||
getSupportedMediaTypes(): ServerMediaTypesResponseDto {
|
||||
return this.service.getSupportedMediaTypes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user