Fix typo saving api

This commit is contained in:
Jesús Ángel González 2018-04-10 17:25:23 +02:00
parent 4a33962f5f
commit 648498ada2
2 changed files with 3 additions and 2 deletions

View File

@ -141,7 +141,7 @@ module.exports = (server, options) => {
const settings = buildSettingsObject(req.payload); const settings = buildSettingsObject(req.payload);
const response = await wzWrapper.createWazuhIndexDocument(settings); const response = await wzWrapper.createWazuhIndexDocument(req,settings);
return reply({ statusCode: 200, message: 'ok', response }); return reply({ statusCode: 200, message: 'ok', response });

View File

@ -364,8 +364,9 @@ class ElasticWrapper{
/** /**
* Usually used to save a new Wazuh API entry * Usually used to save a new Wazuh API entry
* @param {*} doc * @param {*} doc
* @param {*} req
*/ */
async createWazuhIndexDocument(doc) { async createWazuhIndexDocument(req,doc) {
try { try {
if(!doc) return Promise.reject(new Error('No valid document given')) if(!doc) return Promise.reject(new Error('No valid document given'))