refactor: deprecate /server-info and replace with /server-info/storage (#9645)

This commit is contained in:
Zack Pollard 2024-05-22 10:25:55 +01:00 committed by GitHub
parent a341ab0050
commit a3e7e8cc31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 265 additions and 99 deletions

View file

@ -1,12 +1,13 @@
import { Controller, Get } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { EndpointLifecycle } from 'src/decorators';
import {
ServerConfigDto,
ServerFeaturesDto,
ServerInfoResponseDto,
ServerMediaTypesResponseDto,
ServerPingResponse,
ServerStatsResponseDto,
ServerStorageResponseDto,
ServerThemeDto,
ServerVersionResponseDto,
} from 'src/dtos/server-info.dto';
@ -23,9 +24,16 @@ export class ServerInfoController {
) {}
@Get()
@EndpointLifecycle({ deprecatedAt: 'v1.106.0' })
@Authenticated()
getServerInfo(): Promise<ServerInfoResponseDto> {
return this.service.getInfo();
getServerInfo(): Promise<ServerStorageResponseDto> {
return this.service.getStorage();
}
@Get('storage')
@Authenticated()
getStorage(): Promise<ServerStorageResponseDto> {
return this.service.getStorage();
}
@Get('ping')