added controller

This commit is contained in:
hannathkadher
2024-10-31 10:14:59 +04:00
parent f1c07360cb
commit f28fa627ed
5 changed files with 23 additions and 31 deletions

View File

@ -2,7 +2,6 @@ import { IsDate, IsOptional } from 'class-validator';
import { IsPageRequestParam } from '../validators/is-page-request-param.validator';
import { ApiProperty } from '@nestjs/swagger';
import { IsSizeRequestParam } from '../validators/is-size-request-param.validator';
import { IsSortParam } from '../validators/is-sort-param.validator';
import { Transform } from 'class-transformer';
import { parseToDate } from '../util/parseToDate';
@ -29,18 +28,6 @@ export class PaginationRequestGetListDto {
})
size?: number;
@IsOptional()
@IsSortParam({
message:
'Incorrect sorting condition format. Should be like this format propertyId:asc,createdDate:desc',
})
@ApiProperty({
name: 'sort',
required: false,
description: 'Sort condition',
})
sort?: string;
@IsOptional()
@ApiProperty({
name: 'name',
@ -49,14 +36,6 @@ export class PaginationRequestGetListDto {
})
name?: string;
@IsOptional()
@ApiProperty({
name: 'include',
required: false,
description: 'Fields to include',
})
include?: string;
@ApiProperty({
name: 'from',
required: false,

View File

@ -6,7 +6,6 @@ export function buildTypeORMWhereClause({ where }) {
// Remove extra nesting if `where` is wrapped within an additional `where` property
const condition = where.where ? where.where : where;
console.log(condition);
const convertToNestedObject = (condition: any): any => {
const result = {};
for (const [key, value] of Object.entries(condition)) {