13 lines
372 B
JavaScript
13 lines
372 B
JavaScript
import { handleEvolutionWebhook } from "../handlers/evolution.js";
|
|
|
|
export const makeEvolutionWebhook = () => async (req, res) => {
|
|
try {
|
|
const result = await handleEvolutionWebhook(req.body || {});
|
|
res.status(result.status).json(result.payload);
|
|
} catch (err) {
|
|
console.error(err);
|
|
res.status(200).json({ ok: true, error: "internal_error" });
|
|
}
|
|
};
|
|
|