Skip to content

Commit

Permalink
fix: add userId to welcome and settings get events
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedorrychkov committed Jan 23, 2024
1 parent 4796be0 commit f8b7d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class SettingsScenario implements IScenarioInstance {
const count = parseFloat(getNumber(message?.text))
const [settings, events] = await Promise.all([
this.settingsService.getByUserId(user.id),
await this.mealEventService.getTodayEvents(),
await this.mealEventService.getTodayEvents(user.id),
])

const isValidNumber = !Number.isNaN(count) ? availableMealCounts?.findIndex((item) => count === item) > -1 : false
Expand Down
2 changes: 1 addition & 1 deletion src/modules/telegram/scenarios/welcome/welcome.scenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ${welcomeFinish}
if (message?.text?.indexOf(WelcomeMessagesIncoming.start) > -1) {
const [settings, events] = await Promise.all([
this.settingsService.getByUserId(userId),
this.mealEventService.getTodayEvents(),
this.mealEventService.getTodayEvents(userId),
])

const isNeedToUseSettigns = !settings?.mealsCountPerDay
Expand Down

0 comments on commit f8b7d3a

Please sign in to comment.