Skip to content

Commit b4f96a5

Browse files
authored
BC-11096 Remove outdated code regarding notification-service (#332)
1 parent a6fac55 commit b4f96a5

File tree

2 files changed

+3
-40
lines changed

2 files changed

+3
-40
lines changed

controllers/account.js

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,9 @@ router.post('/', async function (req, res) {
3333
});
3434

3535
router.get('/', function (req, res, next) {
36-
if (process.env.NOTIFICATION_SERVICE_ENABLED) {
37-
api(req).get('/notification/devices')
38-
.then(device => {
39-
device.map(d => {
40-
if (d.token === req.cookies.deviceToken) {
41-
Object.assign(d, {selected: true});
42-
}
43-
return d;
44-
});
45-
res.render('account/settings', {
46-
title: 'Dein Account',
47-
device,
48-
userId: res.locals.currentUser._id
49-
});
50-
}).catch(err => {
51-
res.render('account/settings', {
52-
title: 'Dein Account',
53-
userId: res.locals.currentUser._id
54-
});
55-
});
56-
} else {
57-
res.render('account/settings', {
58-
title: 'Dein Account',
59-
userId: res.locals.currentUser._id
60-
});
61-
}
62-
});
63-
64-
// delete file
65-
router.delete('/settings/device', function (req, res, next) {
66-
const {name, _id = ''} = req.body;
67-
68-
api(req).delete('/notification/devices/' + _id).then(_ => {
69-
res.sendStatus(200);
70-
}).catch(err => {
71-
res.status((err.statusCode || 500)).send(err);
36+
res.render('account/settings', {
37+
title: 'Dein Account',
38+
userId: res.locals.currentUser._id
7239
});
7340
});
7441

static/styles/account/settings.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
background: none repeat scroll 0 0;
2020
}
2121

22-
.send-test-notification {
23-
margin-left: 20px;
24-
}
25-
2622
h4 {
2723
color: $primaryColor;
2824
}

0 commit comments

Comments
 (0)