[Updater] Fix sendToSlack call to await its completion

This commit is contained in:
Valtteri Kantanen
2025-02-28 16:33:51 +02:00
parent c21ffe9a74
commit 7419cc169d
+1 -1
View File
@@ -70,7 +70,7 @@ app.post('/v1/studyplans', async (req, res) => {
const { studentnumbers } = req.body const { studentnumbers } = req.body
const msg = `Scheduling update of ${studentnumbers.length} students whose studyplan has not been updated recently` const msg = `Scheduling update of ${studentnumbers.length} students whose studyplan has not been updated recently`
logger.info(msg) logger.info(msg)
sendToSlack(msg) await sendToSlack(msg)
await scheduleByStudentNumbers(studentnumbers) await scheduleByStudentNumbers(studentnumbers)
res.locals.msg('Shceduled studyplans update') res.locals.msg('Shceduled studyplans update')
}) })