refactor: global validation pipe (#7985)

* refactor: global validation pipe

* chore: formatting
This commit is contained in:
Jason Rasmussen 2024-03-15 12:51:08 -04:00 committed by GitHub
parent 5a6b71dda3
commit 2a0e1c0d3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 14 additions and 74 deletions

View file

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