fix: Apply strict schema for all body and query parameters (#7624)
This commit is contained in:
@@ -174,21 +174,16 @@ medusaIntegrationTestRunner({
|
||||
|
||||
describe("POST /admin/customers", () => {
|
||||
it("should create a customer", async () => {
|
||||
const response = await api
|
||||
.post(
|
||||
"/admin/customers",
|
||||
{
|
||||
first_name: "newf",
|
||||
last_name: "newl",
|
||||
email: "new@email.com",
|
||||
password: "newpassword",
|
||||
metadata: { foo: "bar" },
|
||||
},
|
||||
adminHeaders
|
||||
)
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
const response = await api.post(
|
||||
"/admin/customers",
|
||||
{
|
||||
first_name: "newf",
|
||||
last_name: "newl",
|
||||
email: "new@email.com",
|
||||
metadata: { foo: "bar" },
|
||||
},
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
expect(response.status).toEqual(200)
|
||||
expect(response.data.customer).toEqual(
|
||||
|
||||
@@ -448,7 +448,7 @@ medusaIntegrationTestRunner({
|
||||
|
||||
it("list sales channels from the publishable api key with free text search filter", async () => {
|
||||
const response = await api.get(
|
||||
`/admin/sales-channels?q=2&publishable_api_key=${pubKey1.id}`,
|
||||
`/admin/sales-channels?q=2&publishable_key_id=${pubKey1.id}`,
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
|
||||
const response = await api.get(
|
||||
`/admin/promotions/${createdPromotion.id}?fields=id,code&expand=`,
|
||||
`/admin/promotions/${createdPromotion.id}?fields=id,code`,
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user