@accounts/database-manager
Advanced tools
Comparing version 0.3.0-beta.29 to 0.3.0-beta.30
@@ -109,2 +109,6 @@ import { DatabaseManager } from '../src'; | ||
} | ||
public setUserDeactivated() { | ||
return this.name; | ||
} | ||
} | ||
@@ -240,2 +244,6 @@ | ||
}); | ||
it('setUserDeactivated should be called on sessionStorage', () => { | ||
expect(databaseManager.setUserDeactivated('userId', true)).toBe('userStorage'); | ||
}); | ||
}); |
@@ -33,2 +33,3 @@ import { DatabaseInterface } from '@accounts/types'; | ||
readonly setResetPassword: DatabaseInterface['setResetPassword']; | ||
readonly setUserDeactivated: DatabaseInterface['setUserDeactivated']; | ||
} |
@@ -220,2 +220,10 @@ "use strict"; | ||
}); | ||
Object.defineProperty(DatabaseManager.prototype, "setUserDeactivated", { | ||
// Return the setResetPassword function from the userStorage | ||
get: function () { | ||
return this.userStorage.setUserDeactivated.bind(this.userStorage); | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
return DatabaseManager; | ||
@@ -222,0 +230,0 @@ }()); |
{ | ||
"name": "@accounts/database-manager", | ||
"version": "0.3.0-beta.29", | ||
"version": "0.3.0-beta.30", | ||
"description": "Accounts Database Manager, allow the use of separate databases for session and user", | ||
@@ -50,4 +50,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@accounts/types": "^0.3.0-beta.29" | ||
"@accounts/types": "^0.3.0-beta.30" | ||
} | ||
} |
@@ -157,2 +157,7 @@ import { DatabaseInterface, DatabaseInterfaceSessions } from '@accounts/types'; | ||
} | ||
// Return the setResetPassword function from the userStorage | ||
public get setUserDeactivated(): DatabaseInterface['setUserDeactivated'] { | ||
return this.userStorage.setUserDeactivated.bind(this.userStorage); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
110848
29
1140