Files
MatrixGW/matrixgw_frontend/src/api/MatrixSyncApi.ts
Pierre HUBERT fb35fca56e
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
Fix build issues
2025-12-03 14:53:06 +01:00

35 lines
655 B
TypeScript

import { APIClient } from "./ApiClient";
export class MatrixSyncApi {
/**
* Start sync thread
*/
static async Start(): Promise<void> {
await APIClient.exec({
method: "POST",
uri: "/matrix_sync/start",
});
}
/**
* Stop sync thread
*/
static async Stop(): Promise<void> {
await APIClient.exec({
method: "POST",
uri: "/matrix_sync/stop",
});
}
/**
* Get sync thread status
*/
static async Status(): Promise<boolean> {
const res = await APIClient.exec({
method: "GET",
uri: "/matrix_sync/status",
});
return (res.data as { started: boolean }).started;
}
}