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

mozilla / blurts-server / e12065f2-5c0b-4697-b6a1-e1341a5d3c0b

pending completion
e12065f2-5c0b-4697-b6a1-e1341a5d3c0b

push

circleci

Vincent
Remove unused import

282 of 1373 branches covered (20.54%)

Branch coverage included in aggregate %.

959 of 3720 relevant lines covered (25.78%)

4.19 hits per line

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

0.0
/routes/user.js
1
'use strict'
2

3
const express = require('express')
×
4
const bearerToken = require('express-bearer-token')
×
5
const bodyParser = require('body-parser')
×
6
const csrf = require('csurf')
×
7

8
const { asyncMiddleware, requireSessionUser } = require('../middleware')
×
9
const {
10
  add, verify, logout,
11
  getDashboard, getPreferences, getBreachStats,
12
  removeEmail, resendEmail, updateCommunicationOptions,
13
  getUnsubscribe, postUnsubscribe, getRemoveFxm, postRemoveFxm, postResolveBreach, getUnsubscribeMonthly
14
} = require('../controllers/user')
×
15

16
const router = express.Router()
×
17
const jsonParser = bodyParser.json()
×
18
const urlEncodedParser = bodyParser.urlencoded({ extended: false })
×
19
const csrfProtection = csrf()
×
20

21
router.get('/dashboard', csrfProtection, requireSessionUser, asyncMiddleware(getDashboard))
×
22
router.get('/preferences', csrfProtection, requireSessionUser, asyncMiddleware(getPreferences))
×
23
router.use('/breach-stats', bearerToken())
×
24
router.get('/breach-stats', urlEncodedParser, asyncMiddleware(getBreachStats))
×
25
router.get('/logout', logout)
×
26
router.post('/email', urlEncodedParser, csrfProtection, requireSessionUser, asyncMiddleware(add))
×
27
router.post('/remove-email', urlEncodedParser, csrfProtection, requireSessionUser, asyncMiddleware(removeEmail))
×
28
router.post('/resend-email', jsonParser, csrfProtection, requireSessionUser, asyncMiddleware(resendEmail))
×
29
router.post('/update-comm-option', jsonParser, csrfProtection, requireSessionUser, asyncMiddleware(updateCommunicationOptions))
×
30
router.get('/verify', jsonParser, asyncMiddleware(verify))
×
31
router.use('/unsubscribe', urlEncodedParser)
×
32
router.get('/unsubscribe', urlEncodedParser, asyncMiddleware(getUnsubscribe))
×
33
router.post('/unsubscribe', csrfProtection, asyncMiddleware(postUnsubscribe))
×
34
router.get('/unsubscribe-monthly', urlEncodedParser, asyncMiddleware(getUnsubscribeMonthly))
×
35
router.get('/remove-fxm', urlEncodedParser, csrfProtection, requireSessionUser, asyncMiddleware(getRemoveFxm))
×
36
router.post('/remove-fxm', jsonParser, csrfProtection, requireSessionUser, asyncMiddleware(postRemoveFxm))
×
37
router.post('/resolve-breach', jsonParser, urlEncodedParser, requireSessionUser, asyncMiddleware(postResolveBreach))
×
38
module.exports = 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