mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -14,7 +14,7 @@ const { flattenUnits, flattenLessons, nextOrderIndex, reorderJunction } = requir
|
||||
const { getFieldValues } = require("../../utils/fieldValues.util");
|
||||
const logActivity = require('../../utils/logActivity.util');
|
||||
const UserNotification = require('../../models/notifications/user_notification.mdl');
|
||||
const { renderNotification } = require('../../services/notificationTemplate.service');
|
||||
const { NOTIFICATION_REGISTRY } = require('../../data/notifications.data');
|
||||
|
||||
// ── Models ────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -2174,11 +2174,11 @@ exports.updateAssessment = async (req, res) => {
|
||||
where: { course_id: courseId },
|
||||
attributes: ['title', 'uuid'],
|
||||
});
|
||||
const notify = await renderNotification({ type: 'assessment_updated', data: {
|
||||
const notify = NOTIFICATION_REGISTRY.assessment_updated.build({
|
||||
assessmentTitle: assessment.title,
|
||||
courseTitle: course?.title ?? null,
|
||||
courseUuid: course?.uuid ?? null,
|
||||
} });
|
||||
});
|
||||
const now = new Date();
|
||||
await UserNotification.bulkCreate(
|
||||
inProgressSessions.map(({ user_id }) => ({
|
||||
|
||||
Reference in New Issue
Block a user