Rename method to match returning connection params behaviour
This commit is contained in:
parent
023d06fd19
commit
235e7f9bc1
@ -41,7 +41,7 @@ JobController.prototype.cancelJob = function (req, res) {
|
|||||||
var next = this;
|
var next = this;
|
||||||
var authApi = new AuthApi(req, params);
|
var authApi = new AuthApi(req, params);
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||||
},
|
},
|
||||||
function cancelJob(err, userDatabase) {
|
function cancelJob(err, userDatabase) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
@ -106,7 +106,7 @@ JobController.prototype.listJob = function (req, res) {
|
|||||||
var next = this;
|
var next = this;
|
||||||
var authApi = new AuthApi(req, params);
|
var authApi = new AuthApi(req, params);
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||||
},
|
},
|
||||||
function listJob(err, userDatabase) {
|
function listJob(err, userDatabase) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
@ -172,7 +172,7 @@ JobController.prototype.getJob = function (req, res) {
|
|||||||
var next = this;
|
var next = this;
|
||||||
var authApi = new AuthApi(req, params);
|
var authApi = new AuthApi(req, params);
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||||
},
|
},
|
||||||
function getJob(err, userDatabase) {
|
function getJob(err, userDatabase) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
@ -242,7 +242,7 @@ JobController.prototype.createJob = function (req, res) {
|
|||||||
var next = this;
|
var next = this;
|
||||||
var authApi = new AuthApi(req, params);
|
var authApi = new AuthApi(req, params);
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||||
},
|
},
|
||||||
function persistJob(err, userDatabase) {
|
function persistJob(err, userDatabase) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
@ -314,7 +314,7 @@ JobController.prototype.updateJob = function (req, res) {
|
|||||||
var next = this;
|
var next = this;
|
||||||
var authApi = new AuthApi(req, params);
|
var authApi = new AuthApi(req, params);
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||||
},
|
},
|
||||||
function updateJob(err, userDatabase) {
|
function updateJob(err, userDatabase) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
|
@ -120,16 +120,12 @@ QueryController.prototype.handleQuery = function (req, res) {
|
|||||||
// 5. Send formatted results back
|
// 5. Send formatted results back
|
||||||
step(
|
step(
|
||||||
function getUserDBInfo() {
|
function getUserDBInfo() {
|
||||||
var next = this;
|
self.userDatabaseService.getConnectionParams(new AuthApi(req, params), cdbUsername, this);
|
||||||
var authApi = new AuthApi(req, params);
|
|
||||||
|
|
||||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
|
||||||
},
|
},
|
||||||
function queryExplain(err, userDatabase){
|
function queryExplain(err, dbParams) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
|
|
||||||
var next = this;
|
dbopts = dbParams;
|
||||||
dbopts = userDatabase;
|
|
||||||
|
|
||||||
if ( req.profiler ) {
|
if ( req.profiler ) {
|
||||||
req.profiler.done('setDBAuth');
|
req.profiler.done('setDBAuth');
|
||||||
@ -137,7 +133,7 @@ QueryController.prototype.handleQuery = function (req, res) {
|
|||||||
|
|
||||||
checkAborted('queryExplain');
|
checkAborted('queryExplain');
|
||||||
|
|
||||||
self.queryTablesApi.getAffectedTablesAndLastUpdatedTime(userDatabase, sql, this);
|
self.queryTablesApi.getAffectedTablesAndLastUpdatedTime(dbParams, sql, this);
|
||||||
},
|
},
|
||||||
function setHeaders(err, queryExplainResult) {
|
function setHeaders(err, queryExplainResult) {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
|
@ -7,7 +7,7 @@ function UserDatabaseService(metadataBackend) {
|
|||||||
this.metadataBackend = metadataBackend;
|
this.metadataBackend = metadataBackend;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserDatabaseService.prototype.getUserDatabase = function (authApi, cdbUsername, callback) {
|
UserDatabaseService.prototype.getConnectionParams = function (authApi, cdbUsername, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var dbParams;
|
var dbParams;
|
||||||
|
Loading…
Reference in New Issue
Block a user