Fixed authentication error in notifications (2)

This commit is contained in:
Tzahi12345
2023-04-17 23:56:52 -04:00
parent 6400b807c2
commit 770916492e

View File

@@ -2031,7 +2031,7 @@ app.post('/api/changeRolePermissions', optionalJwt, async (req, res) => {
// notifications
app.post('/api/getNotifications', optionalJwt, async (req, res) => {
const uuid = req.user.uid;
const uuid = req.isAuthenticated() ? req.user.uid : null;
const notifications = await db_api.getRecords('notifications', {user_uid: uuid});