|
|
@ -82,12 +82,12 @@ module.exports = function (templateInfo, fileName) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let postParsed = inspectModule.inspect.postparsed; |
|
|
|
let postParsed = inspectModule.inspect.postparsed; |
|
|
|
let tags = Object.keys(getTags(postParsed)) |
|
|
|
let placeholders = Object.keys(getTags(postParsed)) |
|
|
|
let templateInfoKeys = Object.keys(templateInfo) |
|
|
|
let templateInfoKeys = Object.keys(templateInfo) |
|
|
|
|
|
|
|
|
|
|
|
//compare template tags and received fields from client(templateInfo)
|
|
|
|
//compare template placeholders and received fields from client(templateInfo)
|
|
|
|
for(let i = 0; i < tags.length; i++){ |
|
|
|
for (let i = 0; i < placeholders.length; i++) { |
|
|
|
if(!templateInfoKeys.includes(tags[i]) ){ |
|
|
|
if (!templateInfoKeys.includes(placeholders[i])) { |
|
|
|
throw ({ |
|
|
|
throw ({ |
|
|
|
eCode: 406, |
|
|
|
eCode: 406, |
|
|
|
eText: 'اطلاعات وارد شده ناقص است' |
|
|
|
eText: 'اطلاعات وارد شده ناقص است' |
|
|
|