modules/0-ui

This commit is contained in:
Lucas Tettamanti
2026-01-15 22:53:37 -03:00
parent ea62385e3d
commit 98e3d78e3d
17 changed files with 17 additions and 23 deletions

View File

@@ -0,0 +1,13 @@
import { handleListConversations } from "../handlers/conversations.js";
export const makeGetConversations = (tenantIdOrFn) => async (req, res) => {
try {
const tenantId = typeof tenantIdOrFn === "function" ? tenantIdOrFn() : tenantIdOrFn;
const items = await handleListConversations({ tenantId, query: req.query });
res.json({ items });
} catch (err) {
console.error(err);
res.status(500).json({ ok: false, error: "internal_error" });
}
};