fix: correct webhook payload keys and add project_id to feedback API

This commit is contained in:
kartik-mem0
2026-03-18 13:27:19 +05:30
parent 8c80b2e7c8
commit dfa5b6d9f0
3 changed files with 55 additions and 36 deletions
@@ -38,15 +38,28 @@ describeIntegration("MemoryClient Integration — Feedback & Export", () => {
});
// ─── Feedback ─────────────────────────────────────────────
// Note: client.feedback() is deprecated and doesn't send org_id/project_id,
// so we call _fetchWithErrorHandling directly to test the API endpoint.
describe("feedback", () => {
test("submits positive feedback on a memory", async () => {
const memoryId = memoryIds[0];
expect(memoryId).toBeDefined();
const result = await client.feedback({
const payload = {
memory_id: memoryId,
feedback: Feedback.POSITIVE,
});
org_id: String(client.organizationId),
project_id: String(client.projectId),
};
const result = await (client as any)._fetchWithErrorHandling(
`${client.host}/v1/feedback/`,
{
method: "POST",
headers: client.headers,
body: JSON.stringify(payload),
},
);
expect(result).toBeDefined();
});