mirror of
https://github.com/immich-app/immich.git
synced 2026-02-12 03:47:51 +03:00
Merge branch 'main' into feature/readonly-sharing
# Conflicts: # mobile/openapi/.openapi-generator/FILES # mobile/openapi/README.md # mobile/openapi/lib/api.dart # mobile/openapi/lib/api_client.dart # server/src/services/album.service.spec.ts
This commit is contained in:
@@ -17,6 +17,7 @@ import { PersonController } from 'src/controllers/person.controller';
|
||||
import { SearchController } from 'src/controllers/search.controller';
|
||||
import { ServerInfoController } from 'src/controllers/server-info.controller';
|
||||
import { SharedLinkController } from 'src/controllers/shared-link.controller';
|
||||
import { SyncController } from 'src/controllers/sync.controller';
|
||||
import { SystemConfigController } from 'src/controllers/system-config.controller';
|
||||
import { TagController } from 'src/controllers/tag.controller';
|
||||
import { TimelineController } from 'src/controllers/timeline.controller';
|
||||
@@ -43,6 +44,7 @@ export const controllers = [
|
||||
SearchController,
|
||||
ServerInfoController,
|
||||
SharedLinkController,
|
||||
SyncController,
|
||||
SystemConfigController,
|
||||
TagController,
|
||||
TimelineController,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { UUIDParamDto } from 'src/validation';
|
||||
@Controller('shared-link')
|
||||
@Authenticated()
|
||||
export class SharedLinkController {
|
||||
constructor(private readonly service: SharedLinkService) {}
|
||||
constructor(private service: SharedLinkService) {}
|
||||
|
||||
@Get()
|
||||
getAllSharedLinks(@Auth() auth: AuthDto): Promise<SharedLinkResponseDto[]> {
|
||||
|
||||
24
server/src/controllers/sync.controller.ts
Normal file
24
server/src/controllers/sync.controller.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { AssetDeltaSyncDto, AssetDeltaSyncResponseDto, AssetFullSyncDto } from 'src/dtos/sync.dto';
|
||||
import { Auth, Authenticated } from 'src/middleware/auth.guard';
|
||||
import { SyncService } from 'src/services/sync.service';
|
||||
|
||||
@ApiTags('Sync')
|
||||
@Controller('sync')
|
||||
@Authenticated()
|
||||
export class SyncController {
|
||||
constructor(private service: SyncService) {}
|
||||
|
||||
@Get('full-sync')
|
||||
getAllForUserFullSync(@Auth() auth: AuthDto, @Query() dto: AssetFullSyncDto): Promise<AssetResponseDto[]> {
|
||||
return this.service.getAllAssetsForUserFullSync(auth, dto);
|
||||
}
|
||||
|
||||
@Get('delta-sync')
|
||||
getDeltaSync(@Auth() auth: AuthDto, @Query() dto: AssetDeltaSyncDto): Promise<AssetDeltaSyncResponseDto> {
|
||||
return this.service.getChangesForDeltaSync(auth, dto);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import { SystemConfigService } from 'src/services/system-config.service';
|
||||
@Controller('system-config')
|
||||
@Authenticated({ admin: true })
|
||||
export class SystemConfigController {
|
||||
constructor(private readonly service: SystemConfigService) {}
|
||||
constructor(private service: SystemConfigService) {}
|
||||
|
||||
@Get()
|
||||
getConfig(): Promise<SystemConfigDto> {
|
||||
|
||||
Reference in New Issue
Block a user