shuttlepro-shared 1.3.37 → 1.3.38
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.
|
@@ -35,7 +35,7 @@ const updateCachedMembers = async (workspaceId) => {
|
|
|
35
35
|
|
|
36
36
|
const getMembers = async (workspaceId) => {
|
|
37
37
|
let members = await getRedisData(workspaceId, MEMBERS);
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
if (!members || members?.length === 0) {
|
|
40
40
|
members = await UserRole.find({ workspaceId })
|
|
41
41
|
.select("userId role userShift roleId isOwner workspaceId")
|
|
@@ -54,7 +54,7 @@ const getMembers = async (workspaceId) => {
|
|
|
54
54
|
.exec();
|
|
55
55
|
await setRedisData(workspaceId, members, MEMBERS, 3600);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
return members;
|
|
59
59
|
};
|
|
60
60
|
|
package/models/Product.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
2
|
const { Schema } = mongoose;
|
|
3
3
|
const axios = require("axios");
|
|
4
|
-
const
|
|
4
|
+
const NewProduct = require("./NewProduct"); // Make sure to import NewProduct model
|
|
5
5
|
|
|
6
6
|
const categorySchema = new Schema({
|
|
7
7
|
_id: false,
|