diff --git a/ormconfig.ts b/ormconfig.ts index ce8b36c..1095c53 100644 --- a/ormconfig.ts +++ b/ormconfig.ts @@ -15,17 +15,17 @@ export const OracleConfig: any = { export const MssqlConfig: any = { // type: 'mssql', - server: 'localhost', - user: 'mssql1433', - password: 'root', - database: 'CarnetDB', - - // server: '172.31.18.76', - // port: 1433, - // user: 'Carnetsys', - // password: 'Carnet1234', + // server: 'localhost', + // user: 'mssql1433', + // password: 'root', // database: 'CarnetDB', + server: '172.31.18.76', + port: 1433, + user: 'Carnetsys', + password: 'Carnet1234', + database: 'CarnetDB', + // entities: [__dirname + '/**/*.entity{.ts,.js}'], // synchronize: true, diff --git a/src/oracle/manage-fee/manage-fee.service.ts b/src/oracle/manage-fee/manage-fee.service.ts index 15ad828..4c2f287 100644 --- a/src/oracle/manage-fee/manage-fee.service.ts +++ b/src/oracle/manage-fee/manage-fee.service.ts @@ -152,7 +152,10 @@ export class ManageFeeService { throw new BadRequestException() } - if (rows[0].ERRORMESG) { + console.warn(rows); + + + if (rows.length>0 && rows[0].ERRORMESG) { console.log(rows[0].ERRORMESG); throw new BadRequestException(rows[0].ERRORMESG) } @@ -379,6 +382,11 @@ export class ManageFeeService { throw new BadRequestException(); } + if (rows.length>0 && rows[0].ERRORMESG) { + console.log(rows[0].ERRORMESG); + throw new BadRequestException(rows[0].ERRORMESG) + } + return rows; } catch (error) { if (error instanceof BadRequestException) { @@ -449,6 +457,11 @@ export class ManageFeeService { throw new BadRequestException(); } + if (rows.length>0 && rows[0].ERRORMESG) { + console.log(rows[0].ERRORMESG); + throw new BadRequestException(rows[0].ERRORMESG) + } + return rows; } catch (error) { if (error instanceof BadRequestException) { @@ -519,6 +532,11 @@ export class ManageFeeService { throw new BadRequestException(); } + if (rows.length>0 && rows[0].ERRORMESG) { + console.log(rows[0].ERRORMESG); + throw new BadRequestException(rows[0].ERRORMESG) + } + return rows; } catch (error) { if (error instanceof BadRequestException) { diff --git a/src/oracle/uscib-managed-sp/region/region.service.ts b/src/oracle/uscib-managed-sp/region/region.service.ts index 11b8fd7..56f6289 100644 --- a/src/oracle/uscib-managed-sp/region/region.service.ts +++ b/src/oracle/uscib-managed-sp/region/region.service.ts @@ -68,7 +68,7 @@ export class RegionService { FROM all_source WHERE name = :pkgName AND type = 'PACKAGE BODY' ORDER BY line`, - { pkgName: 'MANAGEPREPARER_PKG' }, // bind variable + { pkgName: 'USCIB_MANAGED_PKG' }, // bind variable { outFormat: oracledb.OUT_FORMAT_OBJECT } ); diff --git a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts index 926776d..04daf07 100644 --- a/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts +++ b/src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.service.ts @@ -106,7 +106,7 @@ export class SpContactsService { throw new BadRequestException(fres[0].ERRORMESG) } - return fres; + return { statusCode: 201, message: "Createdted Successfully", ...fres[0] }; } catch (error) { if (error instanceof BadRequestException) { throw error; @@ -244,7 +244,7 @@ export class SpContactsService { throw new BadRequestException(fres[0].ERRORMESG) } - return fres; + return { statusCode: 200, message: "Updated Successfully" }; } catch (error) { if (error instanceof BadRequestException) { this.logger.warn(error.message);