feat(labeling): ratios reset for labeling implemeneted

This commit is contained in:
2025-07-14 12:37:38 -05:00
parent a7f8e39bac
commit 61f0b7f06b
11 changed files with 340 additions and 8 deletions

View File

@@ -1,23 +1,23 @@
import { eq } from "drizzle-orm";
import { db } from "../../../../../database/dbclient.js";
import { labelRatio } from "../../../../../database/schema/ratios.js";
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
export const getLabelRatio = async () => {
const { data: labelInfo, error: labelError } = await tryCatch(
db.select().from(labelRatio)
db.select().from(labelRatio).where(eq(labelRatio.name, "label"))
);
if (labelError) {
return {
success: false,
message: "There was an error getting the labels",
message: "There was an error getting the labelratio",
data: [labelError],
};
}
return {
success: true,
message: "Current labels order by upd_Date.",
count: labelInfo.length,
message: "Current labelratio.",
data: labelInfo,
};
};