From 029aab6901be065acd4340f332c42700331bfa95 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 28 Nov 2022 00:24:36 -0500 Subject: [PATCH] *Fix type handling --- src/modules/plugins/rpc.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/modules/plugins/rpc.ts b/src/modules/plugins/rpc.ts index 846b7e6..0016e8c 100644 --- a/src/modules/plugins/rpc.ts +++ b/src/modules/plugins/rpc.ts @@ -4,7 +4,6 @@ import { PluginAPI, RPCBroadcastRequest, RPCBroadcastResponse, - RPCClearCacheResponse, RPCRequest, RPCResponse, } from "@lumeweb/relay-types"; @@ -54,7 +53,7 @@ const plugin: Plugin = { }); api.registerMethod("clear_cached_item", { cacheable: false, - async handler(req: string): Promise { + async handler(req: string): Promise { if (typeof req !== "string") { throw new Error("item must be a string"); } @@ -63,10 +62,6 @@ const plugin: Plugin = { } catch (e: any) { throw e; } - - return { - data: true, - }; }, }); api.registerMethod("broadcast_request", { @@ -87,7 +82,7 @@ const plugin: Plugin = { signedField: "relays", }; for (const relay in resp) { - let ret: RPCClearCacheResponse; + let ret: RPCResponse; try { ret = await resp.get(relay); } catch (e: any) {