shuttlepro-shared 1.2.23 → 1.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/config/redis.js +2 -3
  2. package/package.json +1 -1
package/config/redis.js CHANGED
@@ -42,7 +42,6 @@ const publishToChannel = async (channel, message) => {
42
42
  try {
43
43
  await connectRedis();
44
44
  await publisher.publish(channel, JSON.stringify(message));
45
- console.log(`📢 Message published to channel: ${channel}`);
46
45
  } catch (err) {
47
46
  console.error("❌ Error publishing message:", err);
48
47
  }
@@ -57,7 +56,6 @@ const subscribeToChannel = async (channel, callback, expiry = false) => {
57
56
  try {
58
57
  await connectRedis();
59
58
  await subscriber.subscribe(channel, (message) => {
60
- console.log(`📥 Message received on channel: ${channel}`);
61
59
  if (expiry) callback(message);
62
60
  else callback(JSON.parse(message));
63
61
  });
@@ -81,9 +79,10 @@ const setRedisData = async (
81
79
  ) => {
82
80
  try {
83
81
  await connectRedis();
82
+ const stringifiedValue = JSON.stringify(value);
84
83
  let result;
85
84
  if (field) {
86
- result = await client.hSet(key, field, JSON.stringify(value));
85
+ result = await client.hSet(key, field, stringifiedValue);
87
86
  } else {
88
87
  result = expiryInSeconds
89
88
  ? await client.set(key, stringifiedValue, { EX: expiryInSeconds })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {