mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: global validation pipe (#7985)
* refactor: global validation pipe * chore: formatting
This commit is contained in:
parent
5a6b71dda3
commit
2a0e1c0d3c
23 changed files with 14 additions and 74 deletions
|
|
@ -8,7 +8,6 @@ import {
|
|||
AssetStatsResponseDto,
|
||||
AuthDto,
|
||||
DeviceIdDto,
|
||||
DownloadService,
|
||||
MapMarkerDto,
|
||||
MapMarkerResponseDto,
|
||||
MemoryLaneDto,
|
||||
|
|
@ -19,21 +18,18 @@ import {
|
|||
TimeBucketAssetDto,
|
||||
TimeBucketDto,
|
||||
TimeBucketResponseDto,
|
||||
TrashService,
|
||||
UpdateAssetDto as UpdateDto,
|
||||
UpdateStackParentDto,
|
||||
} from '@app/domain';
|
||||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { Auth, Authenticated, SharedLinkRoute } from '../app.guard';
|
||||
import { UseValidation } from '../app.utils';
|
||||
import { Route } from '../interceptors';
|
||||
import { UUIDParamDto } from './dto/uuid-param.dto';
|
||||
|
||||
@ApiTags('Asset')
|
||||
@Controller('assets')
|
||||
@Authenticated()
|
||||
@UseValidation()
|
||||
export class AssetsController {
|
||||
constructor(private searchService: SearchService) {}
|
||||
|
||||
|
|
@ -50,13 +46,8 @@ export class AssetsController {
|
|||
@ApiTags('Asset')
|
||||
@Controller(Route.ASSET)
|
||||
@Authenticated()
|
||||
@UseValidation()
|
||||
export class AssetController {
|
||||
constructor(
|
||||
private service: AssetService,
|
||||
private downloadService: DownloadService,
|
||||
private trashService: TrashService,
|
||||
) {}
|
||||
constructor(private service: AssetService) {}
|
||||
|
||||
@Get('map-marker')
|
||||
getMapMarkers(@Auth() auth: AuthDto, @Query() options: MapMarkerDto): Promise<MapMarkerResponseDto[]> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue