woocommerce integration, controllers and handlers ready, evolution api simulator ready

This commit is contained in:
Lucas Tettamanti
2026-01-02 16:49:35 -03:00
parent 556c49e53d
commit 303c3daafe
19 changed files with 637 additions and 141 deletions

View File

@@ -0,0 +1,16 @@
import { handleGetConversationState } from "../handlers/conversationState.js";
export const makeGetConversationState = (tenantIdOrFn) => async (req, res) => {
try {
const tenantId = typeof tenantIdOrFn === "function" ? tenantIdOrFn() : tenantIdOrFn;
const { status, payload } = await handleGetConversationState({
tenantId,
chat_id: req.query.chat_id || null,
});
res.status(status).json(payload);
} catch (err) {
console.error(err);
res.status(500).json({ ok: false, error: "internal_error" });
}
};