mirror of
https://github.com/Expand-sys/ccash-client-js
synced 2026-03-22 12:27:09 +11:00
feat: add ping
This commit is contained in:
parent
0a1d35812d
commit
dbe1008850
2 changed files with 5 additions and 0 deletions
|
|
@ -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 } })
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue