mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
units,lesson as standalone
This commit is contained in:
@@ -24,6 +24,7 @@ async function list(req, res) {
|
||||
order: [['createdAt', 'DESC']],
|
||||
limit,
|
||||
offset,
|
||||
where: { show_in_notifications: true },
|
||||
});
|
||||
|
||||
return R.success(res, 'Notifications fetched.', {
|
||||
@@ -39,7 +40,7 @@ async function list(req, res) {
|
||||
// ─── GET /admin/notifications/unseen ─────────────────────────────────────────
|
||||
async function unseenCount(req, res) {
|
||||
try {
|
||||
const count = await AdminNotification.count({ where: { seen: false } });
|
||||
const count = await AdminNotification.count({ where: { seen: false, show_in_notifications: true } });
|
||||
return R.success(res, 'Unseen count fetched.', { count });
|
||||
} catch (err) {
|
||||
console.error('[NOTIFICATION] unseenCount error:', err);
|
||||
|
||||
Reference in New Issue
Block a user