Pick up changed ping API
This commit is contained in:
parent
7413299cec
commit
c5af0d40d8
2 changed files with 20 additions and 7 deletions
|
|
@ -284,14 +284,22 @@ export class SyncService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async checkConnection(): Promise<CheckConnectionResult> {
|
public async checkConnection(): Promise<CheckConnectionResult> {
|
||||||
|
const { vaultName } = this.settings.getSettings();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await this.pingClient.GET("/ping", {
|
const response = await this.pingClient.GET(
|
||||||
params: {
|
"/vaults/{vault_id}/ping",
|
||||||
header: {
|
{
|
||||||
authorization: `Bearer ${this.settings.getSettings().token}`
|
params: {
|
||||||
|
header: {
|
||||||
|
authorization: `Bearer ${this.settings.getSettings().token}`
|
||||||
|
},
|
||||||
|
path: {
|
||||||
|
vault_id: vaultName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
`Ping response: ${JSON.stringify(response.data)}`
|
`Ping response: ${JSON.stringify(response.data)}`
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface paths {
|
export interface paths {
|
||||||
"/ping": {
|
"/vaults/{vault_id}/ping": {
|
||||||
parameters: {
|
parameters: {
|
||||||
query?: never;
|
query?: never;
|
||||||
header?: never;
|
header?: never;
|
||||||
|
|
@ -17,7 +17,9 @@ export interface paths {
|
||||||
header?: {
|
header?: {
|
||||||
authorization?: string;
|
authorization?: string;
|
||||||
};
|
};
|
||||||
path?: never;
|
path: {
|
||||||
|
vault_id: string;
|
||||||
|
};
|
||||||
cookie?: never;
|
cookie?: never;
|
||||||
};
|
};
|
||||||
requestBody?: never;
|
requestBody?: never;
|
||||||
|
|
@ -555,6 +557,9 @@ export interface components {
|
||||||
lastUpdateId: number;
|
lastUpdateId: number;
|
||||||
latestDocuments: components["schemas"]["DocumentVersionWithoutContent"][];
|
latestDocuments: components["schemas"]["DocumentVersionWithoutContent"][];
|
||||||
};
|
};
|
||||||
|
PingPathParams: {
|
||||||
|
vault_id: string;
|
||||||
|
};
|
||||||
/** @description Response to a ping request. */
|
/** @description Response to a ping request. */
|
||||||
PingResponse: {
|
PingResponse: {
|
||||||
/** @description Whether the client is authenticated based on the sent Authorization header. */
|
/** @description Whether the client is authenticated based on the sent Authorization header. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue