From 21f608b1b36d5d163ab99a0ac6f6654906be2136 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Fri, 23 Sep 2022 16:08:57 -0400 Subject: [PATCH] Comments --- functions/src/test-scheduled-function.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/src/test-scheduled-function.ts b/functions/src/test-scheduled-function.ts index 423206f7..41aa9fe9 100644 --- a/functions/src/test-scheduled-function.ts +++ b/functions/src/test-scheduled-function.ts @@ -2,13 +2,14 @@ import { APIError, newEndpoint } from './api' import { sendPortfolioUpdateEmailsToAllUsers } from './weekly-portfolio-emails' import { isProd } from './utils' +// Function for testing scheduled functions locally export const testscheduledfunction = newEndpoint( { method: 'GET', memory: '4GiB' }, async (_req) => { - // Replace your function here if (isProd()) throw new APIError(400, 'This function is only available in dev mode') + // Replace your function here await sendPortfolioUpdateEmailsToAllUsers() return { success: true }