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> {
|
||||
const { vaultName } = this.settings.getSettings();
|
||||
|
||||
try {
|
||||
const response = await this.pingClient.GET("/ping", {
|
||||
params: {
|
||||
header: {
|
||||
authorization: `Bearer ${this.settings.getSettings().token}`
|
||||
const response = await this.pingClient.GET(
|
||||
"/vaults/{vault_id}/ping",
|
||||
{
|
||||
params: {
|
||||
header: {
|
||||
authorization: `Bearer ${this.settings.getSettings().token}`
|
||||
},
|
||||
path: {
|
||||
vault_id: vaultName
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
this.logger.debug(
|
||||
`Ping response: ${JSON.stringify(response.data)}`
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
export interface paths {
|
||||
"/ping": {
|
||||
"/vaults/{vault_id}/ping": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
|
|
@ -17,7 +17,9 @@ export interface paths {
|
|||
header?: {
|
||||
authorization?: string;
|
||||
};
|
||||
path?: never;
|
||||
path: {
|
||||
vault_id: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
|
|
@ -555,6 +557,9 @@ export interface components {
|
|||
lastUpdateId: number;
|
||||
latestDocuments: components["schemas"]["DocumentVersionWithoutContent"][];
|
||||
};
|
||||
PingPathParams: {
|
||||
vault_id: string;
|
||||
};
|
||||
/** @description Response to a ping request. */
|
||||
PingResponse: {
|
||||
/** @description Whether the client is authenticated based on the sent Authorization header. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue