added mssql db creds and modified contacts api

This commit is contained in:
Kallesh B S 2025-05-16 12:48:57 +05:30
parent 4c66a1a252
commit 2413ba955e
4 changed files with 31 additions and 13 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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 }
);

View File

@ -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);