db/ReadOnlyManager: use jshint

This commit is contained in:
booo 2011-12-22 12:00:47 +01:00
parent 928dfcb384
commit d63b7cf188

View file

@ -39,7 +39,7 @@ exports.getReadOnlyId = function (padId, callback)
function(dbReadOnlyId, callback)
{
//there is no readOnly Entry in the database, let's create one
if(dbReadOnlyId == null)
if(!dbReadOnlyId)
{
readOnlyId = "r." + randomString(16);
@ -59,8 +59,8 @@ exports.getReadOnlyId = function (padId, callback)
if(ERR(err, callback)) return;
//return the results
callback(null, readOnlyId);
})
}
});
};
/**
* returns a the padId for a read only id
@ -69,7 +69,7 @@ exports.getReadOnlyId = function (padId, callback)
exports.getPadId = function(readOnlyId, callback)
{
db.get("readonly2pad:" + readOnlyId, callback);
}
};
/**
* Generates a random String with the given length. Is needed to generate the read only ids