chore(medusa): rm default created at field (#8213)

**What**
To maintain the backward compatibility, we use to populate `created_at` no matter what. But since we can break things from v1, I ll remove it as we moved the default ordering to the repository layer
This commit is contained in:
Adrien de Peretti
2024-07-22 08:20:14 +00:00
committed by GitHub
parent f74fdcb644
commit c307972a99
4 changed files with 7 additions and 15 deletions
@@ -706,15 +706,10 @@ medusaIntegrationTestRunner({
// TODO: This doesn't work currently, but worked in v1
it.skip("returns a list of ordered products by variants prices ASC", async () => {})
// BREAKING: It seems `id` and `created_at` is always returned, even if not in the fields params
it("products contain only fields defined with `fields` param", async () => {
const response = await api.get("/store/products?fields=handle")
expect(response.status).toEqual(200)
expect(Object.keys(response.data.products[0])).toEqual([
"handle",
"created_at",
"id",
])
expect(Object.keys(response.data.products[0])).toEqual(["handle", "id"])
})
it("returns a list of products in collection", async () => {