mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
refactor: function async and just await it
This commit is contained in:
parent
17929bb655
commit
cb055b218c
1 changed files with 2 additions and 5 deletions
|
|
@ -47,12 +47,9 @@ export class DittoAPIStore implements NRelay {
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(filters: NostrFilter[], opts?: { signal?: AbortSignal }): Promise<void> {
|
async remove(filters: NostrFilter[], opts?: { signal?: AbortSignal }): Promise<void> {
|
||||||
const { relay } = this.opts;
|
const { relay } = this.opts;
|
||||||
if (!relay.remove) {
|
return await relay.remove!(filters, opts);
|
||||||
return Promise.reject(new Error("Method not 'remove' not available."));
|
|
||||||
}
|
|
||||||
return relay.remove(filters, opts);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async close(): Promise<void> {
|
async close(): Promise<void> {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue