Fix Bug
This commit is contained in:
@@ -89,6 +89,23 @@ module.exports.getOne = [
|
||||
}
|
||||
]
|
||||
|
||||
module.exports.getOneByIMEI = [
|
||||
[
|
||||
param('imei').notEmpty().isString().withMessage('ایدی اشتباه است')
|
||||
],
|
||||
checkValidations(validationResult),
|
||||
async (req, res) => {
|
||||
const data = await Device.findOne({IMEI:req.params.imei}).sort({ created_at: -1 })
|
||||
if (!data) {
|
||||
res.status(404).json(_sr.fa.not_found.item_id)
|
||||
} else {
|
||||
res.status(200).json(data)
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
module.exports.updateDevice = [
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user