xcally-nest-library 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/.nvmrc +1 -1
- package/dist/src/config/env.validation.d.ts +2 -1
- package/dist/src/config/env.validation.js +1 -0
- package/dist/src/config/env.validation.js.map +1 -1
- package/dist/src/db/typeorm/generic.repository.js +1 -5
- package/dist/src/db/typeorm/generic.repository.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/config/env.validation.ts +1 -0
- package/src/db/typeorm/generic.repository.ts +1 -5
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "xcally-nest-library",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.10",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"test:cov": "jest --coverage",
|
25
25
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
26
26
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
27
|
-
"link
|
28
|
-
"unlink
|
27
|
+
"lib:link": "pnpm link --global",
|
28
|
+
"lib:unlink": "pnpm unlink xcally-nest-libs"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
31
|
"@nestjs/axios": "^3.0.2",
|
@@ -90,12 +90,8 @@ export class GenericRepository<E extends ObjectLiteral> {
|
|
90
90
|
* @returns A promise that resolves to the retrieved entity.
|
91
91
|
*/
|
92
92
|
async findById(id: number): Promise<E> {
|
93
|
-
|
93
|
+
return await this.repository.findOneBy({
|
94
94
|
id: Equal(id),
|
95
95
|
} as unknown as FindOptionsWhere<E>);
|
96
|
-
if (!entity) {
|
97
|
-
throw undefined;
|
98
|
-
}
|
99
|
-
return entity;
|
100
96
|
}
|
101
97
|
}
|