From 42ecc9d5da1e8b31b47e2cdb256c2bf341157fe1 Mon Sep 17 00:00:00 2001 From: Omer Dital Date: Sun, 12 Mar 2023 13:54:44 +0200 Subject: [PATCH] [functions] add the ability to edit the default 'httpsCallable' function default options --- functions/useHttpsCallable.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/functions/useHttpsCallable.ts b/functions/useHttpsCallable.ts index 28b14f6..717c61c 100644 --- a/functions/useHttpsCallable.ts +++ b/functions/useHttpsCallable.ts @@ -2,6 +2,7 @@ import { Functions, httpsCallable, HttpsCallableResult, + HttpsCallableOptions } from 'firebase/functions'; import { useCallback, useState } from 'react'; @@ -27,11 +28,13 @@ export default ( const callCallable = useCallback( async ( - data?: RequestData + data?: RequestData, + options?: HttpsCallableOptions ): Promise | undefined> => { const callable = httpsCallable( functions, - name + name, + options ); setLoading(true); setError(undefined);