feat(subscription): separate selection from payment and add issue feedback
Docker Image / Build and Push Docker Image (push) Successful in 2m2s

(cherry picked from commit fe9d31146b)
This commit is contained in:
Codex
2026-07-27 11:35:28 +08:00
parent 9602fdd94d
commit b34d3a3a67
15 changed files with 1339 additions and 74 deletions
@@ -32,12 +32,17 @@ describe("FeedbackApi", () => {
viewport: "392x760@2.75",
},
images: [image],
idempotencyKey: "payment_feedback_123",
});
expect(response).toEqual({ feedbackId: "feedback-123" });
expect(httpClientMock).toHaveBeenCalledWith(
"/api/feedback",
expect.objectContaining({ method: "POST", body: expect.any(FormData) }),
expect.objectContaining({
method: "POST",
body: expect.any(FormData),
headers: { "Idempotency-Key": "payment_feedback_123" },
}),
);
const body = httpClientMock.mock.calls[0][1].body as FormData;
expect(body.get("category")).toBe("problem");
+3
View File
@@ -19,6 +19,9 @@ export class FeedbackApi {
const envelope = await httpClient<ApiEnvelope<unknown>>(ApiPath.feedback, {
method: "POST",
body,
...(input.idempotencyKey
? { headers: { "Idempotency-Key": input.idempotencyKey } }
: {}),
});
return FeedbackSubmitResponseSchema.parse(unwrap(envelope));
}