This commit is contained in:
Daniel García Aubert
2018-03-13 11:43:08 +01:00
parent 337b47685c
commit 88ae2d473a
+2 -2
View File
@@ -20,7 +20,7 @@ AnalysesController.prototype.register = function (app) {
prepareResponse(),
setCacheControlHeader(),
sendResponse(),
unathorizedError()
unauthorizedError()
);
};
@@ -112,7 +112,7 @@ function sendResponse () {
};
}
function unathorizedError () {
function unauthorizedError () {
return function unathorizedErrorMiddleware(err, req, res, next) {
if (err.message.match(/permission\sdenied/)) {
err = new Error('Unauthorized');