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 }