|
|
|
@ -1,13 +1,9 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
module.exports = function(redisClient, module) {
|
|
|
|
|
module.exports = function(redisClient, module) {
|
|
|
|
|
module.setObject = function(key, data, callback) {
|
|
|
|
|
// TODO: this crashes if callback isnt supplied -baris
|
|
|
|
|
redisClient.hmset(key, data, function(err, res) {
|
|
|
|
|
if(typeof callback === 'function') {
|
|
|
|
|
callback(err, res);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
callback = callback || function() {};
|
|
|
|
|
redisClient.hmset(key, data, callback);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.setObjectField = function(key, field, value, callback) {
|
|
|
|
|