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 authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||
},
|
||||
function cancelJob(err, userDatabase) {
|
||||
assert.ifError(err);
|
||||
@ -106,7 +106,7 @@ JobController.prototype.listJob = function (req, res) {
|
||||
var next = this;
|
||||
var authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||
},
|
||||
function listJob(err, userDatabase) {
|
||||
assert.ifError(err);
|
||||
@ -172,7 +172,7 @@ JobController.prototype.getJob = function (req, res) {
|
||||
var next = this;
|
||||
var authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||
},
|
||||
function getJob(err, userDatabase) {
|
||||
assert.ifError(err);
|
||||
@ -242,7 +242,7 @@ JobController.prototype.createJob = function (req, res) {
|
||||
var next = this;
|
||||
var authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||
},
|
||||
function persistJob(err, userDatabase) {
|
||||
assert.ifError(err);
|
||||
@ -314,7 +314,7 @@ JobController.prototype.updateJob = function (req, res) {
|
||||
var next = this;
|
||||
var authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(authApi, cdbUsername, next);
|
||||
},
|
||||
function updateJob(err, userDatabase) {
|
||||
assert.ifError(err);
|
||||
|
@ -120,16 +120,12 @@ QueryController.prototype.handleQuery = function (req, res) {
|
||||
// 5. Send formatted results back
|
||||
step(
|
||||
function getUserDBInfo() {
|
||||
var next = this;
|
||||
var authApi = new AuthApi(req, params);
|
||||
|
||||
self.userDatabaseService.getUserDatabase(authApi, cdbUsername, next);
|
||||
self.userDatabaseService.getConnectionParams(new AuthApi(req, params), cdbUsername, this);
|
||||
},
|
||||
function queryExplain(err, userDatabase){
|
||||
function queryExplain(err, dbParams) {
|
||||
assert.ifError(err);
|
||||
|
||||
var next = this;
|
||||
dbopts = userDatabase;
|
||||
dbopts = dbParams;
|
||||
|
||||
if ( req.profiler ) {
|
||||
req.profiler.done('setDBAuth');
|
||||
@ -137,7 +133,7 @@ QueryController.prototype.handleQuery = function (req, res) {
|
||||
|
||||
checkAborted('queryExplain');
|
||||
|
||||
self.queryTablesApi.getAffectedTablesAndLastUpdatedTime(userDatabase, sql, this);
|
||||
self.queryTablesApi.getAffectedTablesAndLastUpdatedTime(dbParams, sql, this);
|
||||
},
|
||||
function setHeaders(err, queryExplainResult) {
|
||||
assert.ifError(err);
|
||||
|
@ -7,7 +7,7 @@ function UserDatabaseService(metadataBackend) {
|
||||
this.metadataBackend = metadataBackend;
|
||||
}
|
||||
|
||||
UserDatabaseService.prototype.getUserDatabase = function (authApi, cdbUsername, callback) {
|
||||
UserDatabaseService.prototype.getConnectionParams = function (authApi, cdbUsername, callback) {
|
||||
var self = this;
|
||||
|
||||
var dbParams;
|
||||
|
Loading…
Reference in New Issue
Block a user