changed the file upload to use streams

This commit is contained in:
Baris Usakli
2013-05-15 11:46:41 -04:00
parent f767d3a007
commit 39798b9f79
4 changed files with 92 additions and 55 deletions

View File

@@ -372,6 +372,15 @@ var config = require('../config.js'),
});
}
User.removeFriend = function(uid, friendid, callback) {
RDB.srem('user:'+uid+':friends', friendid, function(err, data){
if(err === null)
callback(data);
else
console.log(err);
});
}
User.exists = function(username, callback) {
User.get_uid_by_username(username, function(exists) {
exists = !!exists;