Files
botino/src/handlers/products.js
2026-01-05 11:15:56 -03:00

14 lines
392 B
JavaScript

import { searchProducts } from "../services/wooProducts.js";
export async function handleSearchProducts({ tenantId, q = "", limit = "10", forceWoo = "0" }) {
const { items, source } = await searchProducts({
tenantId,
q,
limit: parseInt(limit, 10) || 10,
forceWoo: String(forceWoo) === "1" || String(forceWoo).toLowerCase() === "true",
});
return { items, source };
}