Added joining servers and better message handling

This commit is contained in:
hydrabolt
2015-08-17 21:02:18 +01:00
parent 945fe8f65e
commit 93361925ab
7 changed files with 110 additions and 44 deletions

View File

@@ -225,4 +225,21 @@ Internal.XHR.getServer = function( token, serverID, callback ) {
}
Internal.XHR.acceptInvite = function(token, inviteID, callback){
console.log(Endpoints.API + "/invite/" + inviteID);
request
.post( Endpoints.API + "/invite/" + inviteID )
.set( "authorization", token )
.end(function(err, res){
if(err){
callback(err);
}else{
callback(null, res.body)
}
});
}
exports.Internal = Internal;