refactor(datamart): changes to customer inventory to include specific whse

This commit is contained in:
2025-06-20 11:16:19 -05:00
parent b9ff0a4138
commit 3073df342f
4 changed files with 17 additions and 7 deletions

View File

@@ -25,12 +25,12 @@ app.openapi(
responses: responses(),
}),
async (c) => {
const customer: string = c.req.query("customer") ?? "";
const customerData: any = c.req.queries();
// make sure we have a vaid user being accessed thats really logged in
apiHit(c, { endpoint: "/getcustomerinventory" });
const { data, error } = await tryCatch(
getCurrentCustomerInv(customer ? customer : null)
getCurrentCustomerInv(customerData ? customerData : null)
);
if (error) {