chore: more usages of peer dependency

This commit is contained in:
Rafael Taranto 2023-10-05 23:50:11 +01:00
parent 294db780b3
commit 241ce5ef54
3 changed files with 4 additions and 15 deletions

View file

@ -1,7 +1,6 @@
const _ = require('lodash/fp')
const crypto = require('crypto')
const pgp = require('pg-promise')()
const dateFormat = require('dateformat')
const { getTimezoneOffset } = require('date-fns-tz')
const { millisecondsToMinutes } = require('date-fns/fp')
@ -375,7 +374,8 @@ function plugins (settings, deviceId) {
logger.debug('notifyConfirmation')
const phone = tx.phone
const timestamp = dateFormat(new Date(), 'UTC:HH:MM Z')
const timestamp = `${(new Date()).toISOString().substring(11, 19)} UTC`
return sms.getSms(CASH_OUT_DISPENSE_READY, phone, { timestamp })
.then(smsObj => {
const rec = {
@ -767,7 +767,7 @@ function plugins (settings, deviceId) {
? '123'
: randomCode()
const timestamp = dateFormat(new Date(), 'UTC:HH:MM Z')
const timestamp = `${(new Date()).toISOString().substring(11, 19)} UTC`
return sms.getSms(CONFIRMATION_CODE, phone, { code, timestamp })
.then(smsObj => {
const rec = {

View file

@ -103,8 +103,6 @@ function formatSmsReceipt (data, options) {
const timestamp = `${(new Date()).toISOString().substring(11, 19)} UTC`
//`10:46:21 PM UTC`
const postReceiptSmsPromise = getSms(RECEIPT, data.customerPhone, { timestamp })
return Promise.all([smsNotices.getSMSNotice(RECEIPT), postReceiptSmsPromise])

View file

@ -1,9 +0,0 @@
const io = require('socket.io-client')
const socket = io('http://localhost:3060')
module.exports = {emit}
function emit (msg) {
socket.emit('message', msg)
}