mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
feat: version check endpoint (#18572)
This commit is contained in:
parent
ef060e97b6
commit
5268dc4ee2
13 changed files with 338 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
import { Body, Controller, Get, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AdminOnboardingUpdateDto, ReverseGeocodingStateResponseDto } from 'src/dtos/system-metadata.dto';
|
||||
import {
|
||||
AdminOnboardingUpdateDto,
|
||||
ReverseGeocodingStateResponseDto,
|
||||
VersionCheckStateResponseDto,
|
||||
} from 'src/dtos/system-metadata.dto';
|
||||
import { Permission } from 'src/enum';
|
||||
import { Authenticated } from 'src/middleware/auth.guard';
|
||||
import { SystemMetadataService } from 'src/services/system-metadata.service';
|
||||
|
|
@ -28,4 +32,10 @@ export class SystemMetadataController {
|
|||
getReverseGeocodingState(): Promise<ReverseGeocodingStateResponseDto> {
|
||||
return this.service.getReverseGeocodingState();
|
||||
}
|
||||
|
||||
@Get('version-check-state')
|
||||
@Authenticated({ permission: Permission.SYSTEM_METADATA_READ, admin: true })
|
||||
getVersionCheckState(): Promise<VersionCheckStateResponseDto> {
|
||||
return this.service.getVersionCheckState();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue