fix: 为微信登录补充请求校验

This commit is contained in:
que01 committed 2026-09-21 11:51:38 +08:00
1 parent 41e4cc0f1c
commit 6edb9d7a30
3 files changed
+17 -3

No files matched your search

+8
View File
@@ -453,6 +453,14 @@ test("customer booking endpoints require a valid customer session", async () =>
assert.deepEqual(JSON.parse(list.body), []);
});
test("wechat login validates the request DTO before exchanging the code", async () => {
const response = await request("/customer/session/wechat", {
method: "POST",
payload: {},
});
assert.equal(response.statusCode, 400);
});
test("customer booking DTO rejects incomplete package requests", async () => {
const response = await request("/customer/bookings", {
method: "POST",