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

mozilla / blurts-server / #13042

pending completion
#13042

push

circleci

mansaj
Merge branch 'main' into MNTOR-1356

282 of 1601 branches covered (17.61%)

Branch coverage included in aggregate %.

433 of 433 new or added lines in 31 files covered. (100.0%)

959 of 4327 relevant lines covered (22.16%)

1.85 hits per line

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

0.0
/src/controllers/unsubscribe.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 { guestLayout } from '../views/guestLayout.js'
6
import {
7
  unsubscribe,
8
  unsubscribeMonthly
9
} from '../views/partials/unsubscribe.js'
10
import { generateToken } from '../utils/csrf.js'
11
import { unsubscribeFromMonthlyReport } from '../utils/email.js'
12

13
function unsubscribePage (req, res) {
14
  const data = {
×
15
    csrfToken: generateToken(res),
16
    partial: unsubscribe
17
  }
18

19
  res.send(guestLayout(data))
×
20
}
21

22
async function unsubscribeMonthlyPage (req, res) {
23
  try {
×
24
    await unsubscribeFromMonthlyReport(req, res)
×
25
  } catch (error) {
26
    console.log(error)
×
27
    return res.redirect('/')
×
28
  }
29

30
  const data = {
×
31
    csrfToken: generateToken(res),
32
    partial: unsubscribeMonthly
33
  }
34

35
  res.send(guestLayout(data))
×
36
}
37

38
export {
39
  unsubscribePage,
40
  unsubscribeMonthlyPage
41
}
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