Skip to content

Commit

Permalink
Fix monthly email
Browse files Browse the repository at this point in the history
  • Loading branch information
RemcoSimonides committed Apr 11, 2024
1 parent 87a1d05 commit fc6dfbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend-functions/src/pubsub/email/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { db, functions } from '@strive/api/firebase'

import { subWeeks, isAfter, subMonths, isWithinInterval } from 'date-fns'

import { createPersonal, inBucketlist, inProgress, Personal, storyEvents } from '@strive/model'
import { createGoal, createPersonal, inBucketlist, inProgress, Personal, storyEvents } from '@strive/model'
import { getDocument } from '../../shared/utils'
import { createGoalEvent, Goal, createGoalStakeholder, GoalStakeholder, createNotificationBase, Feature, Features, Motivation, Motivations } from '@strive/model'
import { groupIds, templateIds } from './ids'
Expand Down Expand Up @@ -78,7 +78,7 @@ async function getStakeholders(uid: string) {
}

async function getGoals(stakeholders: GoalStakeholder[]): Promise<Goal[]> {
const promises = stakeholders.map(stakeholder => getDocument<Goal>(`Goals/${stakeholder.goalId}`))
const promises = stakeholders.map(stakeholder => getDocument<Goal>(`Goals/${stakeholder.goalId}`).then(createGoal))
return Promise.all(promises)
}

Expand Down

0 comments on commit fc6dfbf

Please sign in to comment.