feat: individual discounts migration

feat: loyalty panel routing
chore: rename promo-codes module to loyalty
This commit is contained in:
Sérgio Salgado 2021-07-22 01:15:01 +01:00 committed by Josh Harvey
parent 576979f14f
commit 07f15db851
14 changed files with 183 additions and 55 deletions

View file

@ -4,11 +4,11 @@ const router = express.Router()
const BN = require('../bn')
const commissionMath = require('../commission-math')
const configManager = require('../new-config-manager')
const promoCodes = require('../promo-codes')
const loyalty = require('../loyalty')
const respond = require('../respond')
function verifyPromoCode (req, res, next) {
promoCodes.getPromoCode(req.body.codeInput)
loyalty.getPromoCode(req.body.codeInput)
.then(promoCode => {
if (!promoCode) return next()