mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-06 09:55:18 +00:00
Fix API call
This commit is contained in:
parent
1a663b2ba4
commit
2312ae40f4
@ -315,12 +315,10 @@ export class AgentsPreviewController {
|
||||
*/
|
||||
async getCurrentApiAddress() {
|
||||
try {
|
||||
const result = await this.genericReq.request('GET', '/elastic/apis');
|
||||
const result = await this.genericReq.request('GET', '/hosts/apis');
|
||||
const entries = result.data || [];
|
||||
const host = entries.filter(e => {
|
||||
return e._id == this.api;
|
||||
});
|
||||
const url = host[0]._source.url;
|
||||
const host = entries.filter(e => {return e.id == this.api});
|
||||
const url = host[0].url;
|
||||
const numToClean = url.startsWith('https://') ? 8 : 7;
|
||||
return url.substr(numToClean);
|
||||
} catch (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user