diff --git a/middleware/load-options.js b/middleware/load-options.js
index 712bec14..d33cbe72 100644
--- a/middleware/load-options.js
+++ b/middleware/load-options.js
@@ -49,8 +49,6 @@ module.exports = (req, res, next) => {
}
);
- console.log(res.locals.options);
-
if (res.locals.options.sha) {
res.setHeader(
'X-note',
diff --git a/middleware/load-user.js b/middleware/load-user.js
index 182567a7..f16dbbc6 100644
--- a/middleware/load-user.js
+++ b/middleware/load-user.js
@@ -20,7 +20,7 @@ module.exports = async (req, res, next) => {
path.join(__dirname, '..', 'users', `${id}.json`),
'utf8'
);
- res.locals.user = JSON.parse(data);
+ res.locals.user = {...res.locals.user, ...JSON.parse(data)};
} catch ({code, message}) {
res.code(500).send(`An internal error occurred - open an issue on https://github.com/remy/mit-license with the following information: ${message}`)
return;
diff --git a/routes/get.js b/routes/get.js
index 2893d6c3..9a7447dd 100644
--- a/routes/get.js
+++ b/routes/get.js
@@ -48,7 +48,7 @@ module.exports = (req, res) => {
gravatar = `
`;
- } else if (user.copyright && typeof user.copyright[0] === 'object' && user.gravatar) {
+ } else if (typeof user.copyright[0] === 'object' && user.gravatar) {
// Supports multi-user format
gravatar = `.toLowerCase()
diff --git a/routes/post.js b/routes/post.js
index fc0cdf53..d13a7d49 100644
--- a/routes/post.js
+++ b/routes/post.js
@@ -105,6 +105,4 @@ module.exports = async (req, res) => {
} catch(err) {
res.status(500).send(`Unable to create new user - please send a pull request on https://github.com/remy/mit-license`)
}
-
- next();
};
diff --git a/users/mit-license.json b/users/mit-license.json
new file mode 100644
index 00000000..f1160c7f
--- /dev/null
+++ b/users/mit-license.json
@@ -0,0 +1,5 @@
+{
+ )