From 86d91da31f1eddc93ed2c6feaf2366272869bdf9 Mon Sep 17 00:00:00 2001 From: --list Date: Thu, 3 Jun 2021 11:03:27 +0200 Subject: [PATCH] added changes to swap and notification service --- .../medusa/src/api/routes/store/returns/create-return.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/medusa/src/api/routes/store/returns/create-return.js b/packages/medusa/src/api/routes/store/returns/create-return.js index 1101dbd08e..c61727c4c5 100644 --- a/packages/medusa/src/api/routes/store/returns/create-return.js +++ b/packages/medusa/src/api/routes/store/returns/create-return.js @@ -31,6 +31,9 @@ import { MedusaError, Validator } from "medusa-core-utils" * option_id: * type: string * description: The id of the Shipping Option to create the Shipping Method from. + * no_notification: + * description: If set to true no notification will be send + * type: boolean * * tags: * - Return @@ -59,7 +62,8 @@ export default async (req, res) => { .keys({ option_id: Validator.string().optional(), }) - .optional() + .optional(), + no_notification: Validator.boolean().optional() }) const { value, error } = schema.validate(req.body) @@ -132,7 +136,8 @@ export default async (req, res) => { .withTransaction(manager) .emit("order.return_requested", { id: value.order_id, - return_id: createdReturn.id + return_id: createdReturn.id, + no_notification: no_notification }) return {