mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Implement responseCode()
This commit is contained in:
parent
89a97537b0
commit
b6e1d4a7d5
@ -50,6 +50,13 @@ class Request implements IHomeServerRequest {
|
||||
response(): Promise<any> {
|
||||
return this._responsePromise;
|
||||
}
|
||||
|
||||
async responseCode(): Promise<number> {
|
||||
let resolve;
|
||||
const promise: Promise<number> = new Promise(r => resolve = r);
|
||||
this.requestResult?.responseCode().then(code => resolve(code));
|
||||
return promise;
|
||||
}
|
||||
}
|
||||
|
||||
class HomeServerApiWrapper {
|
||||
|
Loading…
Reference in New Issue
Block a user