Pick up changed ping API

This commit is contained in:
Andras Schmelczer 2025-03-29 12:28:12 +00:00
parent 7413299cec
commit c5af0d40d8
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
2 changed files with 20 additions and 7 deletions

View file

@ -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)}`

View file

@ -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. */