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 { 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 }
|
||||
|
|
Loading…
Reference in New Issue
Block a user