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.
@@ -1,8 +1,5 @@
1
1
  const mongoose = require("mongoose");
2
- const {
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
- workspaceSchema.post("save", async function (doc) {
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.52",
3
+ "version": "1.2.53",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {