mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): update asset endpoint (#3973)
* refactor(server): update asset * chore: open api
This commit is contained in:
parent
26bc889f8d
commit
454737ca79
27 changed files with 237 additions and 184 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
TimeBucketAssetDto,
|
||||
TimeBucketDto,
|
||||
TimeBucketResponseDto,
|
||||
UpdateAssetDto as UpdateDto,
|
||||
} from '@app/domain';
|
||||
import { Body, Controller, Get, HttpCode, HttpStatus, Param, Post, Put, Query, StreamableFile } from '@nestjs/common';
|
||||
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||
|
|
@ -90,4 +91,13 @@ export class AssetController {
|
|||
updateAssets(@AuthUser() authUser: AuthUserDto, @Body() dto: AssetBulkUpdateDto): Promise<void> {
|
||||
return this.service.updateAll(authUser, dto);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
updateAsset(
|
||||
@AuthUser() authUser: AuthUserDto,
|
||||
@Param() { id }: UUIDParamDto,
|
||||
@Body() dto: UpdateDto,
|
||||
): Promise<AssetResponseDto> {
|
||||
return this.service.update(authUser, id, dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue