feat(ocp): add lots with scroll view was added
This commit is contained in:
23
server/services/ocp/controller/lots/lots.ts
Normal file
23
server/services/ocp/controller/lots/lots.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||
import { query } from "../../../sqlServer/prodSqlServer.js";
|
||||
import { lotQuery } from "../../../sqlServer/querys/ocp/lots.js";
|
||||
|
||||
export const getLots = async () => {
|
||||
const { data: lotInfo, error: lotError } = await tryCatch(
|
||||
query(lotQuery, "Alplalabel online lots")
|
||||
);
|
||||
|
||||
if (lotError) {
|
||||
return {
|
||||
success: false,
|
||||
message: "There was an error getting the lots",
|
||||
data: lotError,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
message: "Current active lots that are technically released.",
|
||||
data: lotInfo,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user