WIP reorganization

This commit is contained in:
Erik Ziegler committed 2018-12-12 09:10:39 +01:00
1 parent 6706dfe634
commit 054e37dfb7
266 files changed
+98 -620

No files matched your search

@@ -0,0 +1,41 @@
// syncrhonous version; doesn't work well
/*exports.command = function(hipaaEvent, timeout) {
var client = this;
this
.execute(function(data){
return HipaaLogger.logEventObject(data);
}, [hipaaEvent], function(result){
console.log("result.value", result.value);
client.assert.ok(result.value);
}).pause(1000)
return this;
};*/
// async version calls method on the server
exports.command = function(hipaaEvent, timeout) {
var client = this;
if (!timeout) {
timeout = 5000;
}
this
.timeoutsAsyncScript(timeout)
.executeAsync(function(data, meteorCallback){
//return HipaaLogger.logEventObject(data);
Meteor.call('logHipaaEvent', data, function(meteorError, meteorResult){
var response = (meteorError ? { error: meteorError } : { result: meteorResult });
meteorCallback(response);
})
}, [hipaaEvent], function(result){
console.log("result.value", result.value);
client.assert.ok(result.value);
}).pause(1000)
return this;
};