diff --git a/index.js b/index.js index 4698a8e..3b61b22 100755 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -const debug = require('debug')('mozilla-proton-campaign-form:server'); +const debug = require('debug')('campaign-form:server'); const http = require('http'); const app = require('./app'); diff --git a/lib/formHandling.js b/lib/formHandling.js index e1c441f..2198fb8 100644 --- a/lib/formHandling.js +++ b/lib/formHandling.js @@ -1,6 +1,6 @@ 'use strict'; -const debug = require('debug')('mozilla-proton-campaign-form:lib:formHandling'); +const debug = require('debug')('campaign-form:lib:formHandling'); const { v4: uuidv4 } = require('uuid'); const { IncomingForm } = require('formidable'); diff --git a/lib/githubBackend.js b/lib/githubBackend.js index 3b755c0..3617591 100644 --- a/lib/githubBackend.js +++ b/lib/githubBackend.js @@ -1,6 +1,6 @@ 'use strict'; -const debug = require('debug')('mozilla-proton-campaign-form:lib:githubBackend'); +const debug = require('debug')('campaign-form:lib:githubBackend'); const { Octokit } = require('@octokit/rest'); const { GITHUB_TOKEN, OWNER, REPO, BASE_URL } = process.env; diff --git a/package-lock.json b/package-lock.json index aab0ac5..91327f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "mozilla-proton-campaign-form", + "name": "campaign-form", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "mozilla-proton-campaign-form", + "name": "campaign-form", "version": "1.0.0", "dependencies": { "@octokit/rest": "^18.7.2", @@ -2215,4 +2215,4 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index dc62b45..4ab0451 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "mozilla-proton-campaign-form", + "name": "campaign-form", "version": "1.0.0", "scripts": { - "start": "DEBUG=mozilla-proton-campaign-form* node index.js" + "start": "DEBUG=campaign-form* node index.js" }, "dependencies": { "@octokit/rest": "^18.7.2", @@ -14,4 +14,4 @@ "pug": "^3.0.2", "uuid": "^8.3.2" } -} +} \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index c407d50..2e50db7 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,6 +1,6 @@ 'use strict'; -const debug = require('debug')('mozilla-proton-campaign-form:routes'); +const debug = require('debug')('campaign-form:routes'); const express = require('express'); const formHandling = require('../lib/formHandling'); const githubBackend = require('../lib/githubBackend'); @@ -23,7 +23,7 @@ router.post('/create', async (req, res) => { const issueNumber = issueInfo && issueInfo.data && issueInfo.data.number; debug('ISSUE_CREATED_REDIRECTING_BACK', issueNumber); res.redirect('/?success=true&submitted=true'); - } catch(error) { + } catch (error) { debug('OH_NO_COULD_NOT_CREATE', error); res.redirect('/?success=false&submitted=true'); }