bigbluebutton-Github/client/bbb-html5-client/lib/controller.coffee
2014-04-13 17:16:37 -07:00

17 lines
481 B
CoffeeScript
Executable File

bus = require './messagebus'
log = require './bbblogger'
exports.processLoginMessage = (data, callback) ->
bus.sendMessage(data, (err, result) ->
if (err)
errLog = {message: "Authentication Failure", reason: err, data: data}
log.error(JSON.stringify(errLog))
callback(err, null)
else
console.log("SUCCESS: #{result}")
if result.error?
callback(result.error, null)
else
callback(null, result.data)
)