Use loopback.AccessToken as default
This commit is contained in:
parent
2c36935404
commit
5cd71cee6b
|
@ -14,7 +14,7 @@ module.exports = token;
|
||||||
|
|
||||||
function token(options) {
|
function token(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var TokenModel = options.model;
|
var TokenModel = options.model || loopback.AccessToken;
|
||||||
assert(TokenModel, 'loopback.token() middleware requires a AccessToken model');
|
assert(TokenModel, 'loopback.token() middleware requires a AccessToken model');
|
||||||
|
|
||||||
return function (req, res, next) {
|
return function (req, res, next) {
|
||||||
|
|
Loading…
Reference in New Issue