mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 10:46:17 +00:00
added controller
This commit is contained in:
@ -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,
|
||||
|
@ -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)) {
|
||||
|
Reference in New Issue
Block a user