fix(medusa-plugin-economic,medusa-plugin-mailchimp,medusa-plugin-restock-notification,medusa-plugin-sendgrid,medusa-plugin-wishlist): Temporarily remove payload validation in some plugins (#3763)
* Temporarily remove payload validation in some plugins * Add changeset * chore: Remove commented out code * Revert discount generator plugin --------- Co-authored-by: olivermrbl <oliver@mrbltech.com> Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
olivermrbl
Oliver Windall Juhl
parent
282e239dfc
commit
4104d9ccb2
@@ -1,18 +1,5 @@
|
||||
export default async (req, res) => {
|
||||
const schema = Validator.object().keys({
|
||||
orderId: Validator.string().required(),
|
||||
})
|
||||
|
||||
const { value, error } = schema.validate(req.body)
|
||||
if (error) {
|
||||
throw new MedusaError(MedusaError.Types.INVALID_DATA, error.details)
|
||||
}
|
||||
|
||||
try {
|
||||
const economicService = req.scope.resolve("economicService")
|
||||
await economicService.bookEconomicInvoice(value.orderId)
|
||||
res.sendStatus(200)
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
const economicService = req.scope.resolve("economicService")
|
||||
await economicService.bookEconomicInvoice(req.body.orderId)
|
||||
res.sendStatus(200)
|
||||
}
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
export default async (req, res) => {
|
||||
const schema = Validator.object().keys({
|
||||
orderId: Validator.string().required(),
|
||||
})
|
||||
|
||||
const { value, error } = schema.validate(req.body)
|
||||
if (error) {
|
||||
throw new MedusaError(MedusaError.Types.INVALID_DATA, error.details)
|
||||
}
|
||||
|
||||
try {
|
||||
const economicService = req.scope.resolve("economicService")
|
||||
await economicService.draftEconomicInvoice(value.orderId)
|
||||
res.sendStatus(200)
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
const economicService = req.scope.resolve("economicService")
|
||||
await economicService.draftEconomicInvoice(req.body.orderId)
|
||||
res.sendStatus(200)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user