diff --git a/package-lock.json b/package-lock.json index 71dba17..2fa8544 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "@types/supertest": "^2.0.11", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", + "class-transformer": "^0.5.1", "dotenv-cli": "^6.0.0" }, "devDependencies": { @@ -3633,9 +3634,7 @@ "node_modules/class-transformer": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", - "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", - "optional": true, - "peer": true + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" }, "node_modules/class-validator": { "version": "0.14.0", @@ -11679,9 +11678,7 @@ "class-transformer": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", - "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", - "optional": true, - "peer": true + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" }, "class-validator": { "version": "0.14.0", diff --git a/package.json b/package.json index bc59ff7..a750cb4 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@types/supertest": "^2.0.11", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", + "class-transformer": "^0.5.1", "dotenv-cli": "^6.0.0" }, "devDependencies": { @@ -70,7 +71,11 @@ "json", "ts" ], - "modulePathIgnorePatterns": [".controller.ts",".module.ts","main.ts"], + "modulePathIgnorePatterns": [ + ".controller.ts", + ".module.ts", + "main.ts" + ], "rootDir": "src", "testRegex": ".*\\.spec\\.ts$", "transform": { diff --git a/src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts b/src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts index 10f7b10..f8c5bf9 100644 --- a/src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts +++ b/src/modules/database/src/adapters/secondaries/prisma-repository.abstract.ts @@ -74,8 +74,6 @@ export abstract class PrismaRepository implements IRepository { } } - // TODO : using any is not good, but needed for nested entities - // TODO : Refactor for good clean architecture ? async create(entity: Partial | any, include?: any): Promise { try { const res = await this._prisma[this._model].create({ diff --git a/src/modules/database/src/exceptions/DatabaseException.ts b/src/modules/database/src/exceptions/database.exception.ts similarity index 100% rename from src/modules/database/src/exceptions/DatabaseException.ts rename to src/modules/database/src/exceptions/database.exception.ts