1
0
Fork 0

allow different collection names

This commit is contained in:
Jan Steemann 2013-07-28 16:29:53 +02:00
parent 43bec2baf0
commit 762e072ee8
1 changed files with 9 additions and 2 deletions

View File

@ -142,11 +142,18 @@ function encodePassword (password) {
/// @brief constructor
////////////////////////////////////////////////////////////////////////////////
function FoxxUsers (applicationContext) {
function FoxxUsers (applicationContext, options) {
'use strict';
this._collectionName = applicationContext.collectionName("users");
this._options = options || { };
this._collection = null;
if (this._options.hasOwnProperty("collectionName")) {
this._collectionName = this._options.collectionName;
}
else {
this._collectionName = applicationContext.collectionName("users");
}
}
////////////////////////////////////////////////////////////////////////////////