mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 11:37:23 -06:00
New method of saving sessions to a file using worker
This commit is contained in:
parent
696261d749
commit
f48f331d43
@ -30,7 +30,7 @@ export class ProviderFiles {
|
|||||||
baseURL: this.baseUrl,
|
baseURL: this.baseUrl,
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
const response = await client.options('/ping');
|
const response = await client.options(`/${this.prefix}/ping`);
|
||||||
if (!response?.data?.pong) {
|
if (!response?.data?.pong) {
|
||||||
throw new Error('Offline file provider.');
|
throw new Error('Offline file provider.');
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ export class ProviderFiles {
|
|||||||
|
|
||||||
public async allInstances(): ResponseProvider {
|
public async allInstances(): ResponseProvider {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`${this.baseUrl}/list-instances/${this.prefix}`);
|
const response = await axios.get(`${this.baseUrl}/${this.prefix}/list-instances`);
|
||||||
return [{ status: response.status, data: response?.data as string[] }];
|
return [{ status: response.status, data: response?.data as string[] }];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return [
|
return [
|
||||||
|
Loading…
Reference in New Issue
Block a user