moved user search to its own file

This commit is contained in:
barisusakli
2014-03-12 22:11:48 -04:00
parent 383b68e7fc
commit d8e00f95a2
3 changed files with 50 additions and 39 deletions

View File

@@ -1,3 +1,5 @@
'use strict';
var async = require('async'),
user = require('../user'),
topics = require('../topics'),
@@ -93,8 +95,9 @@ SocketUser.updateProfile = function(socket, data, callback) {
if(err) {
return callback(err);
}
if(!isAdmin) {
return callback(new Error('not allowed!'))
return callback(new Error('not allowed!'));
}
user.updateProfile(data.uid, data, callback);