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:
mgabor
2024-04-17 12:59:50 +02:00
257 changed files with 7638 additions and 8458 deletions

View File

@@ -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,

View File

@@ -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[]> {

View 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);
}
}

View File

@@ -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> {