Comparing version 0.5.0 to 0.5.1
@@ -74,5 +74,5 @@ /* | ||
//Set default permissions | ||
this.enableStatus = options.status || false; | ||
this.UserModel = options.model || db.model('User'); | ||
this.PermissionModel = db.model('Permission', PermissionSchema); | ||
exports.enableStatus = options.status || false; | ||
exports.UserModel = options.model || db.model('User'); | ||
exports.PermissionModel = db.model('Permission', PermissionSchema); | ||
//Return a middleware | ||
@@ -108,3 +108,3 @@ return function init(req, res, next) { | ||
//Create new User with this data | ||
var permissionAuth = new this.PermissionModel({ | ||
var permissionAuth = new exports.PermissionModel({ | ||
access_token: access_token, | ||
@@ -153,3 +153,3 @@ ip: ip, | ||
try { | ||
this.PermissionModel.remove({ | ||
exports.PermissionModel.remove({ | ||
access_token: access_token | ||
@@ -194,3 +194,3 @@ }, function(err) { | ||
//Save this scope | ||
var that = this; | ||
var that = exports; | ||
// return a middleware | ||
@@ -197,0 +197,0 @@ return function authenticate(req, res, next) { |
{ | ||
"name": "bella", | ||
"description": "A API Authentication for node.js", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"homepage": "https://github.com/chrisenytc/bella", | ||
@@ -6,0 +6,0 @@ "author": { |
{ | ||
"name": "Bella API", | ||
"description": "Bella API: A API Authentication for node.js", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"url": "https://github.com/chrisenytc/bella", | ||
@@ -6,0 +6,0 @@ "options": { |
Sorry, the diff of this file is not supported yet
19499