* Stats computing correctly * Styles propagating - testing in prod now * Formatting html * Reset portfolio flag on mondays at 12am * Add profit, styling * More styling, less reports * Cleanup * Comments * comment * Try to send higher signal emails * Send emails to proper email address
18 lines
533 B
TypeScript
18 lines
533 B
TypeScript
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) => {
|
|
if (isProd())
|
|
throw new APIError(400, 'This function is only available in dev mode')
|
|
|
|
// Replace your function here
|
|
await sendPortfolioUpdateEmailsToAllUsers()
|
|
|
|
return { success: true }
|
|
}
|
|
)
|