Skip to content

Commit

Permalink
chore: Release v1.3.9 - See CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-KumarH committed Oct 22, 2023
1 parent fc6c7da commit c3d4a5f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.9 (October 22nd, 2023)

- fix delete tokens from redis on user deletion

## 1.3.8 (October 21st, 2023)

- delete tokens from redis on user deletion
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@restorecommerce/identity-srv",
"version": "1.3.8",
"version": "1.3.9",
"description": "Restorecommerce identity service",
"main": "lib/start.js",
"author": "n-fuse GmbH",
Expand Down
15 changes: 7 additions & 8 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2238,13 +2238,6 @@ export class UserService extends ServiceBase<UserListResponse, UserList> impleme
logger.info('Users collection deleted');
return deleteResponse;
}
logger.silly('Deleting User IDs', { userIDs });

// delete users
const deleteStatusArr = await super.delete(DeleteRequest.fromPartial({
ids: userIDs
}), context);
logger.info('Users deleted:', userIDs);
if (userIDs.length > 0) {
const filters = [{
filters: [{
Expand All @@ -2260,13 +2253,19 @@ export class UserService extends ServiceBase<UserListResponse, UserList> impleme
if (userData?.items?.length > 0) {
userData?.items?.forEach((user) => {
user?.payload?.tokens?.forEach(async (tokenObj) => {
if(tokenObj?.token) {
if (tokenObj?.token) {
await this.tokenRedisClient.del(tokenObj.token);
}
});
});
}
}
logger.silly('Deleting User IDs', { userIDs });
// delete users
const deleteStatusArr = await super.delete(DeleteRequest.fromPartial({
ids: userIDs
}), context);
logger.info('Users deleted:', userIDs);
return deleteStatusArr;
}
}
Expand Down

0 comments on commit c3d4a5f

Please sign in to comment.