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

mozilla / blurts-server / #13275

pending completion
#13275

push

circleci

rhelmer
MNTOR-1452 - use UPDATE FOR to lock table and prevent race condition when adding email

282 of 1679 branches covered (16.8%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

959 of 4548 relevant lines covered (21.09%)

1.76 hits per line

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

0.0
/src/controllers/dialog.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 { dialogLayout } from '../views/dialogLayout.js'
7
import { generateToken } from '../utils/csrf.js'
8

9
async function dialog (req, res) {
10
  const partialName = req.params.name
×
11

12
  const data = {
×
13
    csrfToken: generateToken(res)
14
  }
15

16
  try {
×
17
    const module = await import(`../views/partials/${partialName}.js`)
×
18
    data.partial = module[partialName]
×
19
  } catch (e) {
20
    return res.sendStatus(404)
×
21
  }
22

23
  switch (partialName) {
×
24
    case 'addEmail':
25
      data.emailLimit = AppConstants.MAX_NUM_ADDRESSES
×
26
      break
×
27
  }
28

29
  res.send(dialogLayout(data))
×
30
}
31

32
export { dialog }
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