Skip to content

Commit

Permalink
use AV.Insight instead of AV.BigQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Aug 27, 2015
1 parent 0c33493 commit 4bfec51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/leanengine.js
Expand Up @@ -249,7 +249,7 @@ Cloud.use('/__engine/1/ping', function(req, res) {
userObj._finishFetch(req.body.object, true);
onLogin(userObj, cb);

} else if (split[1] === 'BigQuery' && split[2] === 'onComplete') {
} else if ((split[1] === 'BigQuery' || split[1] === 'Insight' ) && split[2] === 'onComplete') {
onCompleteBigQueryJob(req.body);
cb(null, 'ok');

Expand Down Expand Up @@ -489,11 +489,11 @@ Cloud.onLogin = function(func) {
};


if (!AV.BigQuery) {
AV.BigQuery = {};
if (!AV.Insight) {
AV.Insight = {};
}

AV.BigQuery.on = function(action, func) {
AV.Insight.on = function(action, func) {
Cloud.define('__on_complete_bigquery_job', func);
};

Expand Down
2 changes: 1 addition & 1 deletion test/function_test.js
Expand Up @@ -158,7 +158,7 @@ AV.Cloud.define("userMatching", function(req, res) {
}, Math.floor((Math.random() * 2000) + 1));
});

AV.BigQuery.on('end', function(err, result) {
AV.Insight.on('end', function(err, result) {
assert.deepEqual({
"id" : "job id",
"status": "OK/ERROR",
Expand Down

0 comments on commit 4bfec51

Please sign in to comment.