@ozdao/prometheus-framework 0.2.92 → 0.2.93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. package/dist/events.server.js +14 -6
  2. package/dist/events.server.mjs +14 -6
  3. package/dist/main-CX2ISR43.mjs +13629 -0
  4. package/dist/main-cffh4bbv.js +92 -0
  5. package/dist/main.css +1 -1
  6. package/dist/orders.server.js +32 -18
  7. package/dist/orders.server.mjs +32 -18
  8. package/dist/organizations.server.js +2 -1
  9. package/dist/organizations.server.mjs +2 -1
  10. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
  12. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  14. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
  16. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
  18. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  20. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  22. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  24. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
  26. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
  28. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  30. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  32. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  34. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  36. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  54. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  56. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  61. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  62. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
  66. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  76. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  78. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +46 -46
  84. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  87. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
  88. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
  90. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
  91. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
  92. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
  93. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +30 -30
  98. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  102. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  104. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
  106. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  110. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
  112. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
  114. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
  116. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +27 -25
  118. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
  120. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +46 -43
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
  126. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  132. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  134. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  136. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  138. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  142. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
  144. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  152. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  154. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +16 -17
  156. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
  158. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  162. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
  166. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  168. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
  170. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
  172. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  174. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  176. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  178. package/dist/prometheus-framework.cjs.js +1 -1
  179. package/dist/prometheus-framework.es.js +1 -1
  180. package/dist/style.css +1 -1
  181. package/dist/web-CQQEUA9l.js +1 -0
  182. package/dist/web-D2Em-p-C.mjs +54 -0
  183. package/package.json +1 -1
  184. package/src/components/Address/Address.vue +23 -34
  185. package/src/components/LocationMarker/LocationMarker.vue +6 -1
  186. package/src/components/LocationSelection/LocationSelection.vue +4 -0
  187. package/src/components/Map/Map.vue +29 -15
  188. package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
  189. package/src/modules/events/controllers/events.controller.js +4 -4
  190. package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
  191. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
  192. package/src/modules/landing/components/pages/Farming.vue +226 -0
  193. package/src/modules/landing/components/pages/Governance.vue +3 -5
  194. package/src/modules/landing/components/pages/Home.vue +0 -3
  195. package/src/modules/landing/components/pages/Hotel.vue +1 -3
  196. package/src/modules/landing/components/pages/Page.vue +0 -3
  197. package/src/modules/landing/components/sections/Examples.vue +4 -56
  198. package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
  199. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
  200. package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
  201. package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
  202. package/src/modules/landing/router/landing.js +11 -0
  203. package/src/modules/marketplace/components/sections/Filters.vue +26 -23
  204. package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
  205. package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
  206. package/src/modules/orders/components/pages/Order.vue +2 -6
  207. package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
  208. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  209. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
  210. package/src/modules/orders/components/pages/Orders.vue +60 -11
  211. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  212. package/src/modules/orders/controllers/orders.controller.js +29 -18
  213. package/src/modules/orders/models/order.model.js +8 -2
  214. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  215. package/src/modules/orders/router/orders.router.js +2 -2
  216. package/src/modules/orders/store/orders.js +3 -7
  217. package/src/modules/orders/store/shopcart.js +1 -1
  218. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
  219. package/src/modules/organizations/components/pages/Department.vue +5 -1
  220. package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
  221. package/src/modules/organizations/components/pages/Members.vue +2 -1
  222. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  223. package/src/modules/organizations/controllers/memberships.controller.js +3 -1
  224. package/src/modules/organizations/store/memberships.js +1 -1
  225. package/src/modules/products/components/blocks/CardProduct.vue +2 -3
  226. package/src/modules/products/components/pages/ProductEdit.vue +10 -13
  227. package/src/modules/products/components/pages/Products.vue +2 -0
  228. package/src/modules/products/store/products.js +25 -2
  229. package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
  230. package/src/modules/users/components/blocks/CardUser.vue +1 -0
  231. package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -353,10 +353,16 @@ class servicePaymentStripe extends servicePayment {
353
353
  return { product, price: newPrice, paymentLink };
354
354
  }
355
355
  async deactivateProduct(event) {
356
- const product = await stripe.products.retrieve(event._id);
357
- await stripe.prices.update(product.default_price, {
358
- active: false
359
- });
356
+ try {
357
+ const product = await stripe.products.retrieve(event._id.toString());
358
+ if (product && product.default_price) {
359
+ await stripe.prices.update(product.default_price, {
360
+ active: false
361
+ });
362
+ }
363
+ } catch (error) {
364
+ console.error("Ошибка при деактивации продукта:", error.message);
365
+ }
360
366
  }
361
367
  async createPaymentLink(event) {
362
368
  const paymentLink = await stripe.paymentLinks.create({
@@ -545,14 +551,16 @@ const middlewareFactory = (db) => {
545
551
  const deleteMethod = async (req, res) => {
546
552
  try {
547
553
  const event = await Event.findOneAndDelete({
548
- id: req.body.id
554
+ _id: req.body._id
549
555
  }).exec();
550
556
  if (!event) {
551
557
  return res.status(404).send({
552
558
  message: "Event is not deleted."
553
559
  });
554
560
  }
555
- await serviceStripe.deactivateProduct(event);
561
+ if (event.special) {
562
+ await serviceStripe.deactivateProduct(event);
563
+ }
556
564
  res.status(200).send(event);
557
565
  } catch (err) {
558
566
  return res.status(500).send({
@@ -351,10 +351,16 @@ class servicePaymentStripe extends servicePayment {
351
351
  return { product, price: newPrice, paymentLink };
352
352
  }
353
353
  async deactivateProduct(event) {
354
- const product = await stripe.products.retrieve(event._id);
355
- await stripe.prices.update(product.default_price, {
356
- active: false
357
- });
354
+ try {
355
+ const product = await stripe.products.retrieve(event._id.toString());
356
+ if (product && product.default_price) {
357
+ await stripe.prices.update(product.default_price, {
358
+ active: false
359
+ });
360
+ }
361
+ } catch (error) {
362
+ console.error("Ошибка при деактивации продукта:", error.message);
363
+ }
358
364
  }
359
365
  async createPaymentLink(event) {
360
366
  const paymentLink = await stripe.paymentLinks.create({
@@ -543,14 +549,16 @@ const middlewareFactory = (db) => {
543
549
  const deleteMethod = async (req, res) => {
544
550
  try {
545
551
  const event = await Event.findOneAndDelete({
546
- id: req.body.id
552
+ _id: req.body._id
547
553
  }).exec();
548
554
  if (!event) {
549
555
  return res.status(404).send({
550
556
  message: "Event is not deleted."
551
557
  });
552
558
  }
553
- await serviceStripe.deactivateProduct(event);
559
+ if (event.special) {
560
+ await serviceStripe.deactivateProduct(event);
561
+ }
554
562
  res.status(200).send(event);
555
563
  } catch (err) {
556
564
  return res.status(500).send({