Skip to content

Commit

Permalink
chore: address commentsx1
Browse files Browse the repository at this point in the history
  • Loading branch information
yashasvibajpai committed Feb 28, 2024
1 parent a0fb0b4 commit b064d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/v0/destinations/redis/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const flatten = require('flat');
const { InstrumentationError } = require('@rudderstack/integrations-lib');
const { isEmpty, isObject } = require('../../util');
const { EventType } = require('../../../constants');
const { handleRecordEventsForRedis } = require('./transformV2');
const { handleRecordEvents } = require('./utils');

// processValues:
// 1. removes keys with empty values or still an object(empty) after flattening
Expand Down Expand Up @@ -64,7 +64,7 @@ const process = (event) => {
const { message, destination, metadata } = event;
// seperate record events
if (message.type === EventType.RECORD) {
return handleRecordEventsForRedis(message, destination, metadata);
return handleRecordEvents(message, destination, metadata);

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L67 was not covered by tests
}

const messageType = message && message.type && message.type.toLowerCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const { transformSubEventTypeProfiles } = require('./transform');
// },
// }

function handleRecordEventsForRedis(message, destination, metadata) {
function handleRecordEvents(message, destination, metadata) {

Check warning on line 35 in src/v0/destinations/redis/utils.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/redis/utils.js#L35

Added line #L35 was not covered by tests
// fields -> traits
// metadata -> metadata
// context.sources.profiles_<$$$> -> context.sources.profiles_<$$$>
Expand All @@ -42,4 +42,4 @@ function handleRecordEventsForRedis(message, destination, metadata) {
return transformSubEventTypeProfiles(message, workspaceId, destinationId);

Check warning on line 42 in src/v0/destinations/redis/utils.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/redis/utils.js#L42

Added line #L42 was not covered by tests
}

module.exports = { handleRecordEventsForRedis };
module.exports = { handleRecordEvents };

0 comments on commit b064d9f

Please sign in to comment.