refactor(sql): improved the return function to show data [] when not connected, prevents crashes

This commit is contained in:
2025-04-24 21:24:39 -05:00
parent 3573fd1a5b
commit ead63d4b41
36 changed files with 323 additions and 141 deletions

View File

@@ -25,10 +25,11 @@ export const postLabelData = async (data: any) => {
data: [],
};
}
let label;
let label: any = [];
const filterQuery = labelData.replaceAll("[rn]", newData.runningNr);
try {
label = await query(filterQuery, "Label data");
const res: any = await query(filterQuery, "Label data");
label = res.data;
} catch (error) {
createLog(
"error",