Comparing version 1.2.13 to 1.2.14
@@ -342,4 +342,5 @@ /* | ||
// method to set res status code | ||
res.status = (status) => { | ||
res.writeHead(status); | ||
res.status = (status, message) => { | ||
res.statusCode = status; | ||
res.statusMessage = message || "not found"; | ||
return res; | ||
@@ -349,3 +350,3 @@ } | ||
res.json = function (data) { | ||
res.setHeader("content-type", "application/json"); | ||
res.writeHead(res.statusCode, {"content-type": "application/json"}); | ||
helpers.json(res, data); | ||
@@ -352,0 +353,0 @@ return res; |
{ | ||
"name": "grandjs", | ||
"version": "1.2.13", | ||
"version": "1.2.14", | ||
"description": "A backend framework for solid web apps based on node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82155
889