diff options
author | vnugent <public@vaughnnugent.com> | 2023-10-04 12:07:14 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-10-04 12:07:14 -0400 |
commit | fcf2497e534cf5e0cae4cc2cd56962688a14bbad (patch) | |
tree | 6435cde441b8d54390d013d840a9154575f7e3a1 /extension/src/entries/background/main.ts | |
parent | 8f75b74c1cdc7a9bd4a29392b481b8902eafba53 (diff) |
fix params method arguments
Diffstat (limited to 'extension/src/entries/background/main.ts')
-rw-r--r-- | extension/src/entries/background/main.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extension/src/entries/background/main.ts b/extension/src/entries/background/main.ts index b4080d6..7573b7a 100644 --- a/extension/src/entries/background/main.ts +++ b/extension/src/entries/background/main.ts @@ -14,7 +14,7 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. import { runtime } from "webextension-polyfill"; -import { HistoryEvent, useHistory } from "./history"; +import { useHistory } from "./history"; import { useNostrApi } from "./nostr-api"; import { useIdentityApi } from "./identity-api"; import { useSettings } from "./settings"; @@ -37,7 +37,7 @@ onMessage('getSiteConfig', onGetSiteConfig); onMessage('setSiteConfig', onSetSitConfig); //Register the api handlers -const { onGetProfile, onGetStatus, onLogin, onLogout, protect } = useAuthApi(); +const { onGetProfile, onGetStatus, onLogin, onLogout, handleProtectedMessage } = useAuthApi(); onMessage('getProfile', onGetProfile); onMessage('getStatus', onGetStatus); @@ -88,7 +88,7 @@ interface HistoryMessage extends JsonObject { event: string } -onMessage <HistoryMessage>('history', protect(async ({data}) =>{ +onMessage<HistoryMessage>('history', handleProtectedMessage(async (data) =>{ switch(data.action){ case HistoryType.get: return getHistory(); |