diff --git a/functions/index.js b/functions/index.js index a35b644..1372793 100644 --- a/functions/index.js +++ b/functions/index.js @@ -1,6 +1,6 @@ import 'dotenv/config'; import initProxy from 'firebase-auth-arcgis-server-proxy'; -import functions from 'firebase-functions/v1'; +import { onRequest } from 'firebase-functions/v2/https'; const options = { host: process.env.AGS_HOST, @@ -45,5 +45,4 @@ const options = { const [proxy, secrets] = initProxy(options); -export const maps = functions.runWith({ secrets, - invoker: 'public' }).https.onRequest(proxy); +export const maps = onRequest({ secrets, invoker: 'public' }, proxy);