koa-passport
Advanced tools
Comparing version 4.0.1 to 4.1.0
# Changelog | ||
## 4.1.0 | ||
- add `res` to `req` #114 | ||
- add `send()` method to `req` #114 | ||
## 4.0.1 | ||
@@ -4,0 +9,0 @@ |
@@ -111,2 +111,7 @@ 'use strict' | ||
function setBodyAndResolve(content) { | ||
if (content) ctx.body = content | ||
resolve(false) | ||
} | ||
// mock the `res` object | ||
@@ -119,6 +124,4 @@ const res = { | ||
setHeader: ctx.set.bind(ctx), | ||
end: function(content) { | ||
if (content) ctx.body = content | ||
resolve(false) | ||
}, | ||
end: setBodyAndResolve, | ||
send: setBodyAndResolve, | ||
set statusCode(status) { | ||
@@ -132,2 +135,4 @@ ctx.status = status | ||
req.res = res | ||
// update the custom callback above | ||
@@ -134,0 +139,0 @@ if (callback) { |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"description": "Passport middleware for Koa", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"koa-route": "^3.2", | ||
"mocha": "^3.5.0", | ||
"mocha": "^5.1.1", | ||
"passport-local": "^1.0", | ||
@@ -31,0 +31,0 @@ "supertest": "^3.0" |
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
16769
338