refactor(biome): format changes
This commit is contained in:
@@ -23,16 +23,15 @@ export async function prodQuery(queryToRun: string, name: string) {
|
||||
});
|
||||
}
|
||||
const query = queryToRun.replaceAll("test1", env.PROD_PLANT_TOKEN);
|
||||
|
||||
try {
|
||||
const result = await pool.request().query(query);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
message: `Query results for: ${name}`,
|
||||
data: result.recordset,
|
||||
};
|
||||
} catch (error: any) {
|
||||
console.log(error);
|
||||
if (error.code === "ETIMEOUT") {
|
||||
return returnFunc({
|
||||
success: false,
|
||||
@@ -51,7 +50,7 @@ export async function prodQuery(queryToRun: string, name: string) {
|
||||
module: "prodSql",
|
||||
subModule: "query",
|
||||
level: "error",
|
||||
message: `${name} encoutnered an error ${error.originalError.info.message}`,
|
||||
message: `${name} encountered an error ${error.originalError.info.message}`,
|
||||
data: [],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export const initializeProdPool = async () => {
|
||||
});
|
||||
}
|
||||
try {
|
||||
pool = sql.connect(sqlConfig);
|
||||
pool = await sql.connect(sqlConfig);
|
||||
|
||||
log.info(
|
||||
`Connected to ${sqlConfig?.server}, using DB: ${sqlConfig?.database}`
|
||||
|
||||
Reference in New Issue
Block a user