Skip to content

Commit

Permalink
fix connection properties issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
jortilles committed May 17, 2024
1 parent e952c91 commit 616063e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions eda/eda_api/lib/module/dashboard/dashboard.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ export class DashboardController {

try {
let connectionProps: any;
if (req.body.dashboard.hasOwnProperty('connectionProperties')) connectionProps = req.body.dashboard.connectionProperties;
if (req.body.dashboard.connectionProperties !== undefined) connectionProps = req.body.dashboard.connectionProperties;

const connection = await ManagerConnectionService.getConnection(req.body.model_id, connectionProps);

Expand Down Expand Up @@ -1009,7 +1009,7 @@ export class DashboardController {
static async execSqlQuery(req: Request, res: Response, next: NextFunction) {
try {
let connectionProps: any;
if (req.body.dashboard.hasOwnProperty('connectionProperties')) connectionProps = req.body.dashboard.connectionProperties;
if (req.body.dashboard.connectionProperties !== undefined) connectionProps = req.body.dashboard.connectionProperties;

const connection = await ManagerConnectionService.getConnection(req.body.model_id, connectionProps);
const dataModel = await connection.getDataSource(req.body.model_id)
Expand Down Expand Up @@ -1261,7 +1261,7 @@ export class DashboardController {
static async getQuery(req: Request, res: Response, next: NextFunction) {
try {
let connectionProps: any;
if (req.body.dashboard.hasOwnProperty('connectionProperties')) connectionProps = req.body.dashboard.connectionProperties;
if (req.body.dashboard.connectionProperties !== undefined) connectionProps = req.body.dashboard.connectionProperties;

const connection = await ManagerConnectionService.getConnection(req.body.model_id, connectionProps);
const dataModel = await connection.getDataSource(req.body.model_id)
Expand All @@ -1281,7 +1281,7 @@ export class DashboardController {
static async execView(req: Request, res: Response, next: NextFunction) {
try {
let connectionProps: any;
if (req.body.dashboard.hasOwnProperty('connectionProperties')) connectionProps = req.body.dashboard.connectionProperties;
if (req.body.dashboard.connectionProperties !== undefined) connectionProps = req.body.dashboard.connectionProperties;

const connection = await ManagerConnectionService.getConnection(req.body.model_id, connectionProps);
const query = req.body.query
Expand Down Expand Up @@ -1365,7 +1365,7 @@ export class DashboardController {

static async cleanDashboardCache(req: Request, res: Response, next: NextFunction) {
let connectionProps: any;
if (req.body.dashboard.hasOwnProperty('connectionProperties')) connectionProps = req.body.dashboard.connectionProperties;
if (req.body.dashboard.connectionProperties !== undefined) connectionProps = req.body.dashboard.connectionProperties;

const connection = await ManagerConnectionService.getConnection(req.body.model_id, connectionProps);
const dataModel = await connection.getDataSource(req.body.model_id)
Expand Down

0 comments on commit 616063e

Please sign in to comment.