fix complaint
This commit is contained in:
@@ -16,11 +16,12 @@ module.exports.create = [
|
||||
body('receptionCode').notEmpty().withMessage(_faSr.required.field),
|
||||
body('caption').notEmpty().withMessage(_faSr.required.caption),
|
||||
body('callType').notEmpty().isBoolean().withMessage(_faSr.required.field),
|
||||
body('brand').notEmpty().isBoolean().withMessage(_faSr.required.field),
|
||||
|
||||
],
|
||||
checkValidations(validationResult),
|
||||
async(req, res) => {
|
||||
const { fullName, national, phoneNumber, deviceNumber, email, receptionCode, caption, callType } = req.body
|
||||
const { fullName, national, phoneNumber, deviceNumber, email, receptionCode, caption, callType, brand } = req.body
|
||||
|
||||
const complaint = await Complaint.create({
|
||||
fullName,
|
||||
@@ -31,7 +32,8 @@ module.exports.create = [
|
||||
callType,
|
||||
email,
|
||||
receptionCode,
|
||||
caption
|
||||
caption,
|
||||
brand
|
||||
})
|
||||
|
||||
res.status(201).json(complaint)
|
||||
|
||||
Reference in New Issue
Block a user