• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / c12b763b-3145-4de7-902f-e08dab211da6

pending completion
c12b763b-3145-4de7-902f-e08dab211da6

Pull #2889

circleci

Florian Zia
fix: Append utm params
Pull Request #2889: Opt-out mechanism for emails

282 of 1437 branches covered (19.62%)

Branch coverage included in aggregate %.

53 of 53 new or added lines in 7 files covered. (100.0%)

959 of 3954 relevant lines covered (24.25%)

4.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/routes/user.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import bodyParser from 'body-parser'
6
import { Router } from 'express'
7

8
import { asyncMiddleware } from '../middleware/util.js'
9
import { requireSessionUser } from '../middleware/auth.js'
10
import { logout } from '../controllers/auth.js'
11
import { dashboardPage } from '../controllers/dashboard.js'
12
import { breachesPage } from '../controllers/breaches.js'
13
import { dataRemovalPage } from '../controllers/data-removal.js'
14
import { settingsPage } from '../controllers/settings.js'
15
import { unsubscribePage } from '../controllers/unsubscribe.js'
16
import { postUnsubscribe } from '../utils/email.js'
17

18
const router = Router()
×
19
const urlEncodedParser = bodyParser.urlencoded({ extended: false })
×
20

21
// dashboard page
22
router.get('/dashboard', requireSessionUser, dashboardPage)
×
23

24
// data breaches detail page
25
router.get('/breaches', requireSessionUser, breachesPage)
×
26

27
// data removal page
28
router.get('/data-removal', requireSessionUser, dataRemovalPage)
×
29

30
// settings page
31
router.get('/settings', requireSessionUser, settingsPage)
×
32

33
// sign the user out
34
router.get('/logout', asyncMiddleware(logout))
×
35

36
// unsubscribe from emails
37
router.get('/unsubscribe', urlEncodedParser, asyncMiddleware(unsubscribePage))
×
38
router.get(
×
39
  '/unsubscribe-monthly',
40
  urlEncodedParser,
41
  asyncMiddleware(unsubscribePage)
42
)
43
router.post('/unsubscribe', asyncMiddleware(postUnsubscribe))
×
44

45
export default router
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc