@duvdu-v1/duvdu 1.1.51 → 1.1.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.
@@ -23,16 +23,16 @@ exports.Message = (0, mongoose_1.model)(model_names_1.MODELS.messages, new mongo
23
23
  default: null
24
24
  },
25
25
  reactions: [reactionSchema],
26
- media: {
27
- type: {
28
- type: String,
29
- default: null
30
- },
31
- url: {
32
- type: String,
33
- default: null
34
- },
35
- },
26
+ media: [{
27
+ type: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ url: {
32
+ type: String,
33
+ default: null
34
+ },
35
+ }],
36
36
  watched: {
37
37
  type: Boolean,
38
38
  default: false
@@ -43,18 +43,7 @@ exports.PortfolioPosts = (0, mongoose_1.model)(model_names_1.MODELS.portfolioPos
43
43
  if (ret.attachments)
44
44
  ret.attachments = ret.attachments.map((el) => process.env.BUCKET_HOST + '/' + el);
45
45
  },
46
- },
46
+ }
47
47
  })
48
48
  .index({ createdAt: 1, updatedAt: -1 })
49
49
  .index({ title: 'text', desc: 'text', tools: 'text', searchKeywords: 'text' }));
50
- exports.PortfolioPosts.schema.set('toJSON', {
51
- transform: function (doc, ret) {
52
- if (ret.cover) {
53
- ret.cover = process.env.BUCKET_HOST + '/' + ret.cover;
54
- }
55
- if (ret.attachments) {
56
- ret.attachments = ret.attachments.map((el) => process.env.BUCKET_HOST + '/' + el);
57
- }
58
- return ret;
59
- }
60
- });
@@ -80,5 +80,5 @@ exports.studioBooking = (0, mongoose_1.model)(model_names_1.MODELS.studioBooking
80
80
  if (ret.attachments)
81
81
  ret.attachments = ret.attachments.map((el) => process.env.BUCKET_HOST + '/' + el);
82
82
  },
83
- },
83
+ }
84
84
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.51",
3
+ "version": "1.1.53",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [