run prettier check properly
This commit is contained in:
parent
dfbadfb4ce
commit
e5eba96dfe
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run format -- --list-different
|
- run: npm run format:check
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run test:cov
|
- run: npm run test:cov
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
"prebuild": "rimraf lib",
|
"prebuild": "rimraf lib",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"format": "prettier --write \"src/**/*.ts\"",
|
"format": "prettier --write \"src/**/*.ts\"",
|
||||||
|
"format:check": "prettier --list-different \"src/**/*.ts\"",
|
||||||
"lint": "eslint -c .eslintrc.json --ext .ts --max-warnings 0 src",
|
"lint": "eslint -c .eslintrc.json --ext .ts --max-warnings 0 src",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
LessThanOrEqual,
|
LessThanOrEqual,
|
||||||
Not,
|
Not,
|
||||||
ILike,
|
ILike,
|
||||||
Brackets
|
Brackets,
|
||||||
} from 'typeorm'
|
} from 'typeorm'
|
||||||
import { PaginateQuery } from './decorator'
|
import { PaginateQuery } from './decorator'
|
||||||
import { ServiceUnavailableException } from '@nestjs/common'
|
import { ServiceUnavailableException } from '@nestjs/common'
|
||||||
@ -117,7 +117,7 @@ export async function paginate<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config.where) {
|
if (config.where) {
|
||||||
queryBuilder = queryBuilder.andWhere(new Brackets(queryBuilder => queryBuilder.andWhere(config.where))) // Postgres fix (https://github.com/ppetzold/nestjs-paginate/pull/97)
|
queryBuilder = queryBuilder.andWhere(new Brackets((queryBuilder) => queryBuilder.andWhere(config.where))) // Postgres fix (https://github.com/ppetzold/nestjs-paginate/pull/97)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query.search && config.searchableColumns) {
|
if (query.search && config.searchableColumns) {
|
||||||
|
Loading…
Reference in New Issue
Block a user