Skip to content

Commit

Permalink
fix: update the return data-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed May 2, 2024
1 parent db3205d commit 8dd90fc
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/v0/destinations/redis/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ const process = (event) => {
}
// JSON.SET <key> . <value>
return {

Check warning on line 71 in src/v0/destinations/redis/transform.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/redis/transform.js#L71

Added line #L71 was not covered by tests
key: `${workspaceId}:${destinationId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`,
value: {
[message.context.sources.profiles_model]: message.traits,
message: {
key: `${workspaceId}:${destinationId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`,
value: {
[message.context.sources.profiles_model]: message.traits,
},
},
userId: message.userId,
};
}

Expand All @@ -81,8 +84,11 @@ const process = (event) => {
// If redis should store information as JSON type
// JSON.SET <key> . <value>
return {

Check warning on line 86 in src/v0/destinations/redis/transform.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/redis/transform.js#L86

Added line #L86 was not covered by tests
key: `${keyPrefix}user:${lodash.toString(message.userId)}`,
value: message.traits || message.context.traits,
message: {
key: `${keyPrefix}user:${lodash.toString(message.userId)}`,
value: message.traits || message.context.traits,

Check warning on line 89 in src/v0/destinations/redis/transform.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/redis/transform.js#L89

Added line #L89 was not covered by tests
},
userId: message.userId,
};
}

Expand Down

0 comments on commit 8dd90fc

Please sign in to comment.