@tinypudding/puddy-lib
Advanced tools
Comparing version 1.1.39 to 1.1.40
@@ -24,6 +24,5 @@ module.exports = function(data, callback) { | ||
// Custom Error | ||
// Function | ||
res.set('WWW-Authenticate', 'Basic realm="401"'); | ||
res.status(401); | ||
if (typeof data.customError === "function") { | ||
@@ -33,12 +32,2 @@ await data.customError(req, res); | ||
// String | ||
else if (typeof data.customError === "string") { | ||
res.status(401).send(data.customError); | ||
} | ||
// Default | ||
else { | ||
res.status(401).send('Authentication required.'); | ||
} | ||
// Return Error | ||
@@ -45,0 +34,0 @@ if (typeof callback === "function") { |
{ | ||
"name": "@tinypudding/puddy-lib", | ||
"version": "1.1.39", | ||
"version": "1.1.40", | ||
"description": "Essential codes to run the other repositories from the Tiny Pudding Account.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
76919
1261