fix: make discounts pass eslint
This commit is contained in:
@@ -20,17 +20,12 @@
|
||||
*/
|
||||
export default async (req, res) => {
|
||||
const { discount_id, code } = req.params
|
||||
const discountService = req.scope.resolve("discountService")
|
||||
await discountService.deleteDynamicCode(discount_id, code)
|
||||
|
||||
try {
|
||||
const discountService = req.scope.resolve("discountService")
|
||||
await discountService.deleteDynamicCode(discount_id, code)
|
||||
const discount = await discountService.retrieve(discount_id, {
|
||||
relations: ["rule", "rule.valid_for", "regions"],
|
||||
})
|
||||
|
||||
const discount = await discountService.retrieve(discount_id, {
|
||||
relations: ["rule", "rule.valid_for", "regions"],
|
||||
})
|
||||
|
||||
res.status(200).json({ discount })
|
||||
} catch (err) {
|
||||
throw err
|
||||
}
|
||||
res.status(200).json({ discount })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user