Comments
This commit is contained in:
parent
c9dacd4739
commit
21f608b1b3
|
@ -2,13 +2,14 @@ import { APIError, newEndpoint } from './api'
|
||||||
import { sendPortfolioUpdateEmailsToAllUsers } from './weekly-portfolio-emails'
|
import { sendPortfolioUpdateEmailsToAllUsers } from './weekly-portfolio-emails'
|
||||||
import { isProd } from './utils'
|
import { isProd } from './utils'
|
||||||
|
|
||||||
|
// Function for testing scheduled functions locally
|
||||||
export const testscheduledfunction = newEndpoint(
|
export const testscheduledfunction = newEndpoint(
|
||||||
{ method: 'GET', memory: '4GiB' },
|
{ method: 'GET', memory: '4GiB' },
|
||||||
async (_req) => {
|
async (_req) => {
|
||||||
// Replace your function here
|
|
||||||
if (isProd())
|
if (isProd())
|
||||||
throw new APIError(400, 'This function is only available in dev mode')
|
throw new APIError(400, 'This function is only available in dev mode')
|
||||||
|
|
||||||
|
// Replace your function here
|
||||||
await sendPortfolioUpdateEmailsToAllUsers()
|
await sendPortfolioUpdateEmailsToAllUsers()
|
||||||
|
|
||||||
return { success: true }
|
return { success: true }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user