feat: add ping

This commit is contained in:
Luke Bennett 2021-06-13 21:28:07 +01:00
parent 0a1d35812d
commit dbe1008850
No known key found for this signature in database
GPG key ID: A738E9C68D3BF31A
2 changed files with 5 additions and 0 deletions

View file

@ -85,6 +85,10 @@ export class CCashClient implements ICCashClient {
return this.http.get('/help').then((response) => response.data);
}
ping(): Promise<boolean> {
return this.http.get('/ping').then((response) => response.data || false);
}
close(pass: string): Promise<boolean> {
return this.http
.post('/close', undefined, { headers: { Password: pass } })

View file

@ -20,6 +20,7 @@ export interface ICCashClient {
// System usage
help(): Promise<string>;
ping(): Promise<boolean>;
close(pass: string): Promise<boolean>;
contains(user: string): Promise<boolean>;
adminVerifyPass(pass: string): Promise<boolean>;