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