fix
This commit is contained in:
@@ -102,14 +102,17 @@ module.exports.checkSerial = [
|
||||
const { serial, type, g } = req.body
|
||||
const serialStatus = await serialChecker(serial, type, g)
|
||||
|
||||
console.log(serialStatus)
|
||||
let okMsg
|
||||
if (type === 'guaranteeSerial') okMsg = 'شماره سریال گارانتی معتبر میباشد.'
|
||||
else okMsg = 'شماره سریال کالا معتبر میباشد.'
|
||||
if (type === 'guaranteeSerial') okMsg = serialStatus
|
||||
else okMsg = serialStatus
|
||||
|
||||
|
||||
let errMsg
|
||||
if (type === 'guaranteeSerial') errMsg = 'شماره سریال گارانتی معتبر نیست.'
|
||||
else errMsg = 'شماره سریال کالا معتبر نیست.'
|
||||
|
||||
|
||||
if (serialStatus) return res.json({ message: okMsg })
|
||||
else return res404(res, errMsg)
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user