refactor(ocp): lots of work for rfid and dyco contorl
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { desc, lte, sql } from "drizzle-orm";
|
||||
import { desc, gte, lte, sql } from "drizzle-orm";
|
||||
import { db } from "../../../../../database/dbclient.js";
|
||||
import { prodlabels } from "../../../../../database/schema/prodLabels.js";
|
||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||
@@ -8,7 +8,7 @@ export const getLabels = async (hours: string) => {
|
||||
.select()
|
||||
.from(prodlabels)
|
||||
.where(
|
||||
lte(
|
||||
gte(
|
||||
prodlabels.upd_date,
|
||||
sql.raw(`NOW() - INTERVAL '${hours} hours'`)
|
||||
)
|
||||
@@ -27,6 +27,7 @@ export const getLabels = async (hours: string) => {
|
||||
return {
|
||||
success: true,
|
||||
message: "Current labels order by upd_Date.",
|
||||
count: labelInfo.length,
|
||||
data: labelInfo,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user