refactor: pull up variable to constants file
This commit is contained in:
parent
ed7c515993
commit
d759704db3
2 changed files with 9 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ const customers = require('./customers')
|
|||
const commissionMath = require('./commission-math')
|
||||
const loyalty = require('./loyalty')
|
||||
|
||||
const { cassetteMaxCapacity } = require('./constants')
|
||||
const { cassetteMaxCapacity, CASH_OUT_DISPENSE_READY, CONFIRMATION_CODE } = require('./constants')
|
||||
|
||||
const notifier = require('./notifier')
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ function plugins (settings, deviceId) {
|
|||
|
||||
const phone = tx.phone
|
||||
const timestamp = dateFormat(new Date(), 'UTC:HH:MM Z')
|
||||
return sms.getSms('cash_out_dispense_ready', phone, { timestamp })
|
||||
return sms.getSms(CASH_OUT_DISPENSE_READY, phone, { timestamp })
|
||||
.then(smsObj => {
|
||||
const rec = {
|
||||
sms: smsObj
|
||||
|
|
@ -723,7 +723,7 @@ function plugins (settings, deviceId) {
|
|||
? '123'
|
||||
: randomCode()
|
||||
|
||||
return sms.getSms('sms_code', phone, { code })
|
||||
return sms.getSms(CONFIRMATION_CODE, phone, { code })
|
||||
.then(smsObj => {
|
||||
const rec = {
|
||||
sms: smsObj
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue