for #55: review fixes
This commit is contained in:
Родитель
981af8d14c
Коммит
e1764f1d55
|
@ -46,7 +46,7 @@ module.exports = {
|
|||
"comma-dangle": ["error", {arrays: "always-multiline", objects: "always-multiline"}],
|
||||
"eol-last": ["error", "always"],
|
||||
"eqeqeq": "error",
|
||||
"no-console": ["warn", {allow: ["error", "info", "warn"]}],
|
||||
"no-console": ["error", {allow: ["error", "info", "warn"]}],
|
||||
"no-process-env": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-unused-vars": ["error", {vars: "all", args: "none", ignoreRestSiblings: false}],
|
||||
|
|
|
@ -8,7 +8,7 @@ const {version, homepage} = require("../package.json");
|
|||
const mozlog = require("../log");
|
||||
|
||||
|
||||
const log = mozlog("dockerflow");
|
||||
const log = mozlog("controllers.dockerflow");
|
||||
const versionJsonPath = path.join(__dirname, "..", "version.json");
|
||||
|
||||
// If the version.json file already exists (e.g., created by circle + docker),
|
||||
|
|
|
@ -16,7 +16,7 @@ async function notification(req, res) {
|
|||
return new Promise((resolve, reject) => {
|
||||
validator.validate(message, async (err, message) => {
|
||||
if (err) {
|
||||
log.error(err);
|
||||
log.error("notification", { err: err });
|
||||
const body = "Access denied. " + err.message;
|
||||
res.status(401).send(body);
|
||||
return reject(body);
|
||||
|
|
2
hibp.js
2
hibp.js
|
@ -82,7 +82,7 @@ const HIBP = {
|
|||
} catch (error) {
|
||||
throw new Error("Could not load breaches: " + error);
|
||||
}
|
||||
log.info("Done loading breaches");
|
||||
log.info("done-loading-breaches");
|
||||
},
|
||||
|
||||
async getUnsafeBreachesForEmail(sha1, allBreaches) {
|
||||
|
|
|
@ -42,7 +42,7 @@ if (app.get("env") !== "dev") {
|
|||
try {
|
||||
await HIBP.loadBreachesIntoApp(app);
|
||||
} catch (error) {
|
||||
log.error(error);
|
||||
log.error("try-load-breaches-error", { error: error });
|
||||
}
|
||||
})();
|
||||
|
||||
|
@ -119,5 +119,5 @@ EmailUtils.init().then(() => {
|
|||
log.info("Listening", { port: listener.address().port });
|
||||
});
|
||||
}).catch(error => {
|
||||
log.error(error);
|
||||
log.error("try-initialize-email-error", { error: error });
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче