|
|
@ -84,7 +84,7 @@ router.use('/user', isAuthenticated(), user);
|
|
|
|
router.get('/settings/public', async (req, res) => {
|
|
|
|
router.get('/settings/public', async (req, res) => {
|
|
|
|
const settings = getSettings();
|
|
|
|
const settings = getSettings();
|
|
|
|
|
|
|
|
|
|
|
|
if (!req.user?.settings?.notificationTypes.webpush) {
|
|
|
|
if (!(req.user?.settings?.notificationTypes.webpush ?? true)) {
|
|
|
|
return res
|
|
|
|
return res
|
|
|
|
.status(200)
|
|
|
|
.status(200)
|
|
|
|
.json({ ...settings.fullPublicSettings, enablePushRegistration: false });
|
|
|
|
.json({ ...settings.fullPublicSettings, enablePushRegistration: false });
|
|
|
|