shuttlepro-shared 1.3.3 → 1.3.5
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.
|
@@ -74,6 +74,11 @@ const findAllWorkspaces = async (filter = {}) => {
|
|
|
74
74
|
Object.entries(filter).every(([key, value]) => ws[key] === value)
|
|
75
75
|
);
|
|
76
76
|
};
|
|
77
|
+
const updateWorkspaceCache = async (id = "") => {
|
|
78
|
+
const workspace = await Workspace.findById(id).lean().exec();
|
|
79
|
+
await updateCachedWorkspaces();
|
|
80
|
+
return workspace;
|
|
81
|
+
};
|
|
77
82
|
|
|
78
83
|
const updateWorkspace = async (id, data) => {
|
|
79
84
|
const updatedWorkspace = await Workspace.findByIdAndUpdate(id, data, {
|
|
@@ -138,4 +143,5 @@ module.exports = {
|
|
|
138
143
|
updateOneWorkspace,
|
|
139
144
|
updateManyWorkspaces,
|
|
140
145
|
deleteWorkspace,
|
|
146
|
+
updateWorkspaceCache,
|
|
141
147
|
};
|
package/models/Order.js
CHANGED
|
@@ -136,10 +136,6 @@ const OrderSchema = new Schema(
|
|
|
136
136
|
paymentDate: { type: String, default: "" },
|
|
137
137
|
paymentDetails: {},
|
|
138
138
|
},
|
|
139
|
-
merged: {
|
|
140
|
-
status: { type: String, default: "open" },
|
|
141
|
-
details: [],
|
|
142
|
-
},
|
|
143
139
|
credentials: {},
|
|
144
140
|
ticketId: { type: String, default: "" },
|
|
145
141
|
sender: { type: String, default: "" },
|