Actions
Activity #3529
openFeature #3752: Design of the web framework for Data Centre Software
Feature #1850: Design and Development for web based ANRS
Module #3527: Development for in-app real-time notifications
Emit Notifications from Backend
Start date:
04/25/2025
Due date:
% Done:
70%
Estimated time:
Planned Due Date:
04/28/2025
Description
upon a new user add, update notifications tables
app.post('/add-user', async (req, res) => {
const io = req.app.get('io');
// 1. Insert user
await addUserToDB(req.body);
// 2. Create a notification entry
await createNotification({
type: 'new_user',
message: 'A new user has been added.',
created_at: new Date(),
status: 'unread',
for_role: 'admin'
});
// 3. Notify connected clients
io.emit('new_user_notification');
res.send({ success: true });
});
Updated by Siji Mathew over 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
Actions