Skip to content

Commit 5964fbd

Browse files
resolve conflict
2 parents 01d3955 + 68d79d6 commit 5964fbd

File tree

3 files changed

+295
-249
lines changed

3 files changed

+295
-249
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ack-nestjs-boilerplate-kafka",
3-
"version": "3.5.1",
3+
"version": "3.5.2",
44
"description": "Ack NestJs Boilerplate Kafka",
55
"repository": {
66
"type": "git",
@@ -48,7 +48,7 @@
4848
"rollback": "yarn rollback:setting && yarn rollback:apikey"
4949
},
5050
"dependencies": {
51-
"@aws-sdk/client-s3": "^3.279.0",
51+
"@aws-sdk/client-s3": "^3.282.0",
5252
"@faker-js/faker": "^7.6.0",
5353
"@joi/date": "^2.1.0",
5454
"@nestjs/axios": "^2.0.0",
@@ -76,15 +76,15 @@
7676
"moment": "^2.29.4",
7777
"mongoose": "^7.0.0",
7878
"morgan": "^1.10.0",
79-
"nest-winston": "^1.8.0",
79+
"nest-winston": "^1.9.0",
8080
"nestjs-command": "^3.1.3",
8181
"nestjs-i18n": "^10.2.6",
8282
"passport": "^0.6.0",
8383
"passport-headerapikey": "^1.2.2",
8484
"passport-jwt": "^4.0.1",
8585
"reflect-metadata": "^0.1.13",
8686
"response-time": "^2.3.2",
87-
"rimraf": "^4.1.2",
87+
"rimraf": "^4.2.0",
8888
"rotating-file-stream": "^3.1.0",
8989
"rxjs": "^7.8.0",
9090
"ua-parser-js": "^1.0.33",
@@ -109,7 +109,7 @@
109109
"@types/morgan": "^1.9.4",
110110
"@types/ms": "^0.7.31",
111111
"@types/multer": "^1.4.7",
112-
"@types/node": "^18.14.2",
112+
"@types/node": "^18.14.5",
113113
"@types/passport-jwt": "^3.0.8",
114114
"@types/supertest": "^2.0.12",
115115
"@types/ua-parser-js": "^0.7.36",

src/common/api-key/services/api-key.service.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,11 @@ export class ApiKeyService implements IApiKeyService {
9090
_id: string,
9191
options?: IDatabaseOptions
9292
): Promise<ApiKeyEntity> {
93-
const dto: ApiKeyActiveDto = new ApiKeyActiveDto();
94-
dto.isActive = true;
95-
9693
return this.apiKeyRepository.updateOneById<ApiKeyActiveDto>(
9794
_id,
98-
dto,
95+
{
96+
isActive: true,
97+
},
9998
options
10099
);
101100
}
@@ -104,12 +103,11 @@ export class ApiKeyService implements IApiKeyService {
104103
_id: string,
105104
options?: IDatabaseOptions
106105
): Promise<ApiKeyEntity> {
107-
const dto: ApiKeyActiveDto = new ApiKeyActiveDto();
108-
dto.isActive = false;
109-
110106
return this.apiKeyRepository.updateOneById<ApiKeyActiveDto>(
111107
_id,
112-
dto,
108+
{
109+
isActive: false,
110+
},
113111
options
114112
);
115113
}
@@ -206,13 +204,12 @@ export class ApiKeyService implements IApiKeyService {
206204
const secret: string = await this.createSecret();
207205
const hash: string = await this.createHashApiKey(key, secret);
208206

209-
const dto: ApiKeyResetDto = new ApiKeyResetDto();
210-
dto.hash = hash;
211-
212207
const apiKey: ApiKeyEntity =
213208
await this.apiKeyRepository.updateOneById<ApiKeyResetDto>(
214209
_id,
215-
dto,
210+
{
211+
hash: hash,
212+
},
216213
options
217214
);
218215

@@ -269,15 +266,15 @@ export class ApiKeyService implements IApiKeyService {
269266
async inactiveManyByEndDate(
270267
options?: IDatabaseManyOptions
271268
): Promise<boolean> {
272-
return this.apiKeyRepository.updateMany(
269+
return this.apiKeyRepository.updateMany<ApiKeyActiveDto>(
273270
{
274-
end_date: {
271+
endDate: {
275272
$lte: this.helperDateService.create(),
276273
},
277-
is_active: true,
274+
isActive: true,
278275
},
279276
{
280-
is_active: false,
277+
isActive: false,
281278
},
282279
options
283280
);

0 commit comments

Comments
 (0)