mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): stacked assets for full sync, userIds as array for delta sync (#9100)
* fix(server): stacked assets for full sync, userIds as array for delta sync * refactor(server): sync * fix getDeltaSync after partner removal --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
fc2e709ad4
commit
32e7cfea3d
22 changed files with 817 additions and 386 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Controller, Get, Query } from '@nestjs/common';
|
||||
import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AssetResponseDto } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
|
|
@ -12,13 +12,15 @@ import { SyncService } from 'src/services/sync.service';
|
|||
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);
|
||||
@Post('full-sync')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
getFullSyncForUser(@Auth() auth: AuthDto, @Body() dto: AssetFullSyncDto): Promise<AssetResponseDto[]> {
|
||||
return this.service.getFullSync(auth, dto);
|
||||
}
|
||||
|
||||
@Get('delta-sync')
|
||||
getDeltaSync(@Auth() auth: AuthDto, @Query() dto: AssetDeltaSyncDto): Promise<AssetDeltaSyncResponseDto> {
|
||||
return this.service.getChangesForDeltaSync(auth, dto);
|
||||
@Post('delta-sync')
|
||||
@HttpCode(HttpStatus.OK)
|
||||
getDeltaSync(@Auth() auth: AuthDto, @Body() dto: AssetDeltaSyncDto): Promise<AssetDeltaSyncResponseDto> {
|
||||
return this.service.getDeltaSync(auth, dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue