Skip to content

Commit

Permalink
Fix when change to an API without intenger id
Browse files Browse the repository at this point in the history
  • Loading branch information
adri9valle committed Aug 2, 2019
1 parent ab6ef8e commit f0658cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/services/api-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ApiTester {

const result = await this.$http.post(
chrome.addBasePath('/api/check-stored-api'),
data,
{id: data.toString()},
headers
);

Expand Down
2 changes: 1 addition & 1 deletion server/controllers/wazuh-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class WazuhApiCtrl {
async checkStoredAPI(req, reply) {
try {
// Get config from config.yml
const apiId = req.payload
const apiId = req.payload.id
const apis = (getConfiguration() || {})['wazuh.hosts'] || []
let api = this.findApi(apis, apiId);
if (!api) {
Expand Down

0 comments on commit f0658cf

Please sign in to comment.