forked from GitHub/dbot
Get user by UUID API function [#331]
This commit is contained in:
parent
86492e3efb
commit
9952e4583c
@ -25,6 +25,14 @@ var api = function(dbot) {
|
||||
});
|
||||
},
|
||||
|
||||
// Return a user record given a UUID
|
||||
'getUser': function(uuid, callback) {
|
||||
this.db.get('users', uuid, function(err, user) {
|
||||
if(err) user = false;
|
||||
callback(user);
|
||||
});
|
||||
},
|
||||
|
||||
'getChannel': function(server, channelName, callback) {
|
||||
var channel = false;
|
||||
this.db.search('channel_users', {
|
||||
|
Loading…
Reference in New Issue
Block a user