Add custom serials
This commit is contained in:
@@ -4,10 +4,10 @@ const readXlsxFile = require('read-excel-file/node')
|
||||
const guaranteeSerialsPath = './static/uploads/serials'
|
||||
const productSerialsPath = './static/uploads/serials_products'
|
||||
|
||||
const serialChecker = async (serial, type = 'guaranteeSerial') => {
|
||||
const serialChecker = async (serial, type = 'guaranteeSerial', g = 1) => {
|
||||
let exelsPath
|
||||
if (type === 'guaranteeSerial') exelsPath = guaranteeSerialsPath
|
||||
if (type === 'orginality') exelsPath = productSerialsPath
|
||||
if (type === 'guaranteeSerial') exelsPath = guaranteeSerialsPath + g
|
||||
if (type === 'orginality') exelsPath = productSerialsPath + g
|
||||
|
||||
const lowerSerial = serial.toLowerCase()
|
||||
// a promise to lowercase items and filter null or DateObjects
|
||||
|
||||
Reference in New Issue
Block a user