File

src/albums/dto/fetch.dto.ts

Index

Properties

Properties

album
Type : string
Decorators :
@IsNotEmpty()
@IsString()
@IsAlbumValid()
extQuery
Type : string
Decorators :
@IsString()
@IsOptional()
pathQuery
Type : string
Decorators :
@IsString()
@IsOptional()
skip
Type : number
Decorators :
@IsNumber()
take
Type : number
Decorators :
@IsNumber()
import { IsAlbumValid } from '../../common/decorators/albumvalid.decorator';
import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

export class FetchDto {
  @IsNotEmpty()
  @IsString()
  @IsAlbumValid()
  album: string;

  @IsNumber()
  skip: number; //amount of entries to skip (defaults to 0, set by the client)
  @IsNumber()
  take: number; //amount of entries to take (usually 12, set by the client)

  @IsString()
  @IsOptional()
  pathQuery: string; //path (upload name) search query
  @IsString()
  @IsOptional()
  extQuery: string; //extension/mime search query
}

results matching ""

    No results matching ""