added changes to swap and notification service
This commit is contained in:
@@ -31,6 +31,9 @@ import { MedusaError, Validator } from "medusa-core-utils"
|
|||||||
* option_id:
|
* option_id:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The id of the Shipping Option to create the Shipping Method from.
|
* 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:
|
* tags:
|
||||||
* - Return
|
* - Return
|
||||||
@@ -59,7 +62,8 @@ export default async (req, res) => {
|
|||||||
.keys({
|
.keys({
|
||||||
option_id: Validator.string().optional(),
|
option_id: Validator.string().optional(),
|
||||||
})
|
})
|
||||||
.optional()
|
.optional(),
|
||||||
|
no_notification: Validator.boolean().optional()
|
||||||
})
|
})
|
||||||
|
|
||||||
const { value, error } = schema.validate(req.body)
|
const { value, error } = schema.validate(req.body)
|
||||||
@@ -132,7 +136,8 @@ export default async (req, res) => {
|
|||||||
.withTransaction(manager)
|
.withTransaction(manager)
|
||||||
.emit("order.return_requested", {
|
.emit("order.return_requested", {
|
||||||
id: value.order_id,
|
id: value.order_id,
|
||||||
return_id: createdReturn.id
|
return_id: createdReturn.id,
|
||||||
|
no_notification: no_notification
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user