Skip to content

Commit

Permalink
fix: correctly de-serialize from redis cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilsol committed Jan 28, 2025
1 parent f718931 commit 4e92947
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ export class UserService extends ServiceBase<UserListResponse, UserList> impleme
new Date(redisToken?.expires_in ?? 0).getTime() === 0
|| new Date(redisToken?.expires_in) >= new Date()
) {
if ('data' in userData && userData.data) {
userData.data.value = Buffer.from(userData.data.value.data);
}
return { payload: userData, status: returnCodeMessage(200, 'success') };
} else {
// delete token from redis and update user entity
Expand Down

0 comments on commit 4e92947

Please sign in to comment.