Skip to content

Commit 1c6ccf6

Browse files
committed
Подготовка к полноценной подписке на уведомления
1 parent ee9ad0d commit 1c6ccf6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

apps/api/src/worker/notificator/index.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { SubscribeModel } from '../../models/Subscribe'
44
import { getCurrPerformance } from '../../routes/performance.current/service'
55
import { checkInterval } from '../utils/checkInterval'
66
import { logger } from '../utils/logger'
7+
import { bot } from './bot'
78
import { INTERVAL_RUN } from './config'
8-
import {bot} from "./bot";
99

1010
let lastRunning: Date | null = null
1111
const log = logger('notificator')
@@ -35,11 +35,13 @@ export const notificatorChecker = async (): Promise<void> => {
3535

3636
if (!subscribe.preActionsIsSuccess) {
3737
getCurrPerformance(cacheData, false).then(() => {
38-
if (!bot)
39-
return
38+
if (!bot) return
4039
subscribe.preActionsIsSuccess = true
4140
subscribe.save()
42-
bot.sendMessage(String(subscribe.tgId), `Мы загрузили ваши оценки. Теперь вы будете получать уведомления!`)
41+
bot.sendMessage(
42+
String(subscribe.tgId),
43+
'Мы загрузили ваши оценки. Теперь вы будете получать уведомления!'
44+
)
4345
})
4446
continue
4547
}

0 commit comments

Comments
 (0)