shuttlepro-shared 1.2.52 → 1.2.53
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.
- package/models/Workspace.js +2 -16
- package/package.json +1 -1
package/models/Workspace.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
|
-
|
|
3
|
-
createDefaultLocations,
|
|
4
|
-
addTaskManagerDefaultData,
|
|
5
|
-
} = require("../libs/shared/helpers");
|
|
2
|
+
//TODO: task manager and default location creation
|
|
6
3
|
const shiftSchema = new mongoose.Schema(
|
|
7
4
|
{
|
|
8
5
|
shiftName: {
|
|
@@ -283,18 +280,7 @@ workspaceSchema.add({
|
|
|
283
280
|
instagramUrl: commonOptions,
|
|
284
281
|
chatGptApiKey: commonOptions,
|
|
285
282
|
});
|
|
286
|
-
|
|
287
|
-
try {
|
|
288
|
-
if (doc?.id) {
|
|
289
|
-
await Promise.all([
|
|
290
|
-
createDefaultLocations(doc.id, doc.createdBy || null),
|
|
291
|
-
addTaskManagerDefaultData(doc.id),
|
|
292
|
-
]);
|
|
293
|
-
}
|
|
294
|
-
} catch (err) {
|
|
295
|
-
console.log("err", err);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
283
|
+
|
|
298
284
|
workspaceSchema.virtual("integrations", {
|
|
299
285
|
ref: "Integration",
|
|
300
286
|
localField: "_id",
|