api controllers refactor

This commit is contained in:
barisusakli
2016-04-30 21:08:47 +03:00
parent ab70220499
commit bea2344ad4
2 changed files with 26 additions and 38 deletions

View File

@@ -339,15 +339,15 @@ SocketUser.invite = function(socket, email, callback) {
};
SocketUser.getUserByUID = function(socket, uid, callback) {
apiController.getUserDataByUID(socket.uid, uid, callback);
apiController.getUserDataByField(socket.uid, 'uid', uid, callback);
};
SocketUser.getUserByUsername = function(socket, username, callback) {
apiController.getUserDataByUsername(socket.uid, username, callback);
apiController.getUserDataByField(socket.uid, 'username', username, callback);
};
SocketUser.getUserByEmail = function(socket, email, callback) {
apiController.getUserDataByEmail(socket.uid, email, callback);
apiController.getUserDataByField(socket.uid, 'email', email, callback);
};