|
|
@ -177,12 +177,13 @@ class PluginState { |
|
|
|
dataExporterApiUrl: string |
|
|
|
dataExporterApiUrl: string |
|
|
|
): Promise<PluginConnectedStatusResponse | string> => { |
|
|
|
): Promise<PluginConnectedStatusResponse | string> => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const resp = await queryApi<PluginConnectedStatusResponse>(`/status`, { |
|
|
|
const resp = await queryApi<PluginConnectedStatusResponse>(`/connect`, { |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
params: { url: window.location.toString() }, |
|
|
|
params: { url: window.location.toString() }, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// TODO: check if the server version is compatible with the plugin
|
|
|
|
// TODO: check if the server version is compatible with the plugin
|
|
|
|
|
|
|
|
// TODO: remove configuration if backend says that api key doesn't work
|
|
|
|
if (resp.version) { |
|
|
|
if (resp.version) { |
|
|
|
return resp; |
|
|
|
return resp; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|