0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

initial commit

This commit is contained in:
Víctor Losada Hernández
2024-10-10 02:06:00 +02:00
parent 55b5c1e713
commit 656c9399ef
6 changed files with 78 additions and 43 deletions

View File

@@ -144,7 +144,9 @@ router.get('/admin/stats', mw.adminOnly, async (req, res)=>{
router.get('/admin/notification/all', async (req, res, next)=>{
try {
const notifications = await NotificationModel.getAll();
console.log('notifications: ', notifications);
return res.json(notifications);
} catch (error) {
console.log('Error getting all notifications: ', error.message);
return res.status(500).json({ message: error.message });