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

mozilla / blurts-server / c5f3d7b4-ee0c-44dd-8229-fb0a50cc276f

pending completion
c5f3d7b4-ee0c-44dd-8229-fb0a50cc276f

Pull #2987

circleci

Amri Toufali
add ESLint plugin for camelCase lint
Pull Request #2987: MNTOR-1171: Code Splitting

282 of 1663 branches covered (16.96%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 9 files covered. (100.0%)

959 of 4511 relevant lines covered (21.26%)

3.55 hits per line

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

0.0
/src/routes/index.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 AppConstants from '../appConstants.js'
6
import express from 'express'
7

8
import adminRoutes from './admin.js'
9
import authRoutes from './auth.js'
10
import dockerFlowRoutes from './dockerflow.js'
11
import hibpApiRoutes from './api/v1/hibp.js'
12
import previewRoutes from './preview.js'
13
import userApiRoutes from './api/v1/user.js'
14
import userRoutes from './user.js'
15
import breachesRoutes from './breaches.js'
16
import breachDetailRoutes from './breachDetail.js'
17

18
import { dialog } from '../controllers/dialog.js'
19
import { landingPage } from '../controllers/landing.js'
20
import { exposureScanPage } from '../controllers/exposureScan.js'
21
import { requestBreachScan } from '../controllers/requestBreachScan.js'
22
import { notFoundPage } from '../controllers/notFound.js'
23
import { notFound } from '../middleware/error.js'
24
import { doubleCsrfProtection } from '../utils/csrf.js'
25

26
const router = express.Router()
×
27

28
router.get('/', landingPage)
×
29
router.get('/scan', exposureScanPage)
×
30
router.get('*/dialog/:name', dialog)
×
31

32
router.use('/admin', doubleCsrfProtection, adminRoutes)
×
33
router.use('/api/v1/hibp/', hibpApiRoutes)
×
34
router.use('/api/v1/scan', doubleCsrfProtection, requestBreachScan)
×
35
router.use('/api/v1/user/', doubleCsrfProtection, userApiRoutes)
×
36
router.use('/oauth', doubleCsrfProtection, authRoutes)
×
37
router.use('/user', doubleCsrfProtection, userRoutes)
×
38
router.use('/breaches', doubleCsrfProtection, breachesRoutes)
×
39
router.use('/breach-details', doubleCsrfProtection, breachDetailRoutes)
×
40
router.use('/', doubleCsrfProtection, dockerFlowRoutes)
×
41

42
// Do not make the non-auth previews available on prod
43
if (AppConstants.NODE_ENV !== 'production') {
×
44
  router.use('/preview', previewRoutes)
×
45
}
46

47
router.use(notFound)
×
48
router.use(notFoundPage)
×
49

50
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