mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): version logic (#9615)
* refactor(server): version * test: better version and log checks
This commit is contained in:
parent
5f25f28c42
commit
1df7be8436
19 changed files with 404 additions and 509 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { ApiProperty, ApiResponseProperty } from '@nestjs/swagger';
|
||||
import { SemVer } from 'semver';
|
||||
import { SystemConfigThemeDto } from 'src/dtos/system-config.dto';
|
||||
import { IVersion } from 'src/utils/version';
|
||||
|
||||
export class ServerPingResponse {
|
||||
@ApiResponseProperty({ type: String, example: 'pong' })
|
||||
|
|
@ -25,13 +25,17 @@ export class ServerInfoResponseDto {
|
|||
diskUsagePercentage!: number;
|
||||
}
|
||||
|
||||
export class ServerVersionResponseDto implements IVersion {
|
||||
export class ServerVersionResponseDto {
|
||||
@ApiProperty({ type: 'integer' })
|
||||
major!: number;
|
||||
@ApiProperty({ type: 'integer' })
|
||||
minor!: number;
|
||||
@ApiProperty({ type: 'integer' })
|
||||
patch!: number;
|
||||
|
||||
static fromSemVer(value: SemVer) {
|
||||
return { major: value.major, minor: value.minor, patch: value.patch };
|
||||
}
|
||||
}
|
||||
|
||||
export class UsageByUserDto {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue