Skip to content

Commit 9468694

Browse files
committed
🔒️ anonymize entity labels
1 parent bdb5720 commit 9468694

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/models/controller.model.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
PubSubContactsMessage,
3636
PubSubContactsState,
3737
} from './pubsub/pubsub-contacts-message.model';
38+
import { anonymizeKey } from '../util/anonymize-key';
3839

3940
const CONTACT_FETCH_TIMEOUT = 5000;
4041

@@ -999,10 +1000,16 @@ export class Controller {
9991000

10001001
infoLogger(
10011002
'getEntity',
1002-
`[${JSON.stringify(fetchedEntity)}] `,
1003+
`successfully got entity`,
10031004
providerConfig.apiKey,
1005+
{
1006+
...fetchedEntity,
1007+
label: anonymizeKey(fetchedEntity?.label),
1008+
},
10041009
);
1005-
infoLogger('getEntity', `END`, providerConfig?.apiKey);
1010+
1011+
infoLogger('getEntity', `END`, providerConfig.apiKey);
1012+
10061013
res.status(200).send(fetchedEntity);
10071014
} catch (error) {
10081015
errorLogger(

0 commit comments

Comments
 (0)