Skip to content

Commit b444f81

Browse files
committed
fix: comments
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent bd5d1ca commit b444f81

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

services/apps/data_sink_worker/src/service/activity.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ export default class ActivityService extends LoggerBase {
10681068
segmentIds: Set<string>
10691069
resultIds: Set<string>
10701070
integrationId: string
1071-
platform: string
1071+
platform: PlatformType
10721072
username: string
10731073
timestamp: string
10741074
}
@@ -1144,7 +1144,7 @@ export default class ActivityService extends LoggerBase {
11441144
organizations: value.member.organizations,
11451145
reach: value.member.reach,
11461146
},
1147-
value.platform as PlatformType,
1147+
value.platform,
11481148
)
11491149
.then((memberId) => {
11501150
// map ids for members

services/libs/common/src/member.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ export async function setAttributesDefaultValues(
1414
for (const attributeName of Object.keys(attributes)) {
1515
if (typeof attributes[attributeName] === 'string') {
1616
// we try to fix it
17-
try {
18-
attributes[attributeName] = JSON.parse(attributes[attributeName] as string)
19-
} catch (err) {
20-
this.log.error(err, { attributeName }, 'Could not parse a string attribute value!')
21-
throw err
22-
}
17+
attributes[attributeName] = JSON.parse(attributes[attributeName] as string)
2318
}
2419

2520
const nonEmptyPlatform = Object.keys(attributes[attributeName]).filter((p) => {

0 commit comments

Comments
 (0)