Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2693d05d07 | ||
|
|
dd50489718 | ||
|
|
3577a70f78 | ||
|
|
3b0be2bbdd | ||
|
|
014b4f88a3 | ||
|
|
3fefd44c49 |
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
|
||||
// GET /store/products descarta en silencio la relacion `categories`
|
||||
// aunque `/admin/products` si la expone -- confirmado en vivo en la
|
||||
// auditoria de Fase 5 (ver docs/decisiones/0004-evaluacion-stack-multi-categoria.md).
|
||||
// Este es el patron oficial de Medusa v2 para ampliar los campos
|
||||
// permitidos de una ruta core restringida (middleware global sobre
|
||||
// req.allowed), no un query-config custom:
|
||||
// https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links
|
||||
export default defineMiddlewares({
|
||||
routes: [
|
||||
{
|
||||
matcher: "/store/products",
|
||||
middlewares: [
|
||||
(req, res, next) => {
|
||||
;(req.allowed ??= []).push("categories")
|
||||
next()
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
runAsNonRoot: false
|
||||
containers:
|
||||
- name: app
|
||||
image: gitea.cruzcloud.net/devops/docs-portal:v1.0.123
|
||||
image: gitea.cruzcloud.net/devops/docs-portal:v1.0.125
|
||||
# El base saca TODAS las capabilities. Probado en vivo y
|
||||
# revertido: con drop: ALL (aunque se agregue NET_BIND_SERVICE
|
||||
# de vuelta) el propio entrypoint de nginx:1.27-alpine falla al
|
||||
|
||||
@@ -65,7 +65,7 @@ spec:
|
||||
memory: 64Mi
|
||||
|
||||
- name: migrations
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.121
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.127
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- node
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
|
||||
containers:
|
||||
- name: app
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.121
|
||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.127
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
||||
@@ -528,7 +528,7 @@ async function fetchProducts(
|
||||
// region_id.
|
||||
region_id: regionId(),
|
||||
fields:
|
||||
"+metadata,+images,+tags,+categories,+collection,+variants.inventory_quantity,+variants.calculated_price,+variants.options",
|
||||
"+metadata,+images,+tags,+categories.*,+collection,+variants.inventory_quantity,+variants.calculated_price,+variants.options",
|
||||
});
|
||||
|
||||
if (filters?.query) {
|
||||
@@ -559,7 +559,7 @@ export const medusaCatalogProvider: CatalogProvider = {
|
||||
// region_id.
|
||||
region_id: regionId(),
|
||||
fields:
|
||||
"+metadata,+images,+tags,+categories,+collection,+variants.inventory_quantity,+variants.calculated_price,+variants.options",
|
||||
"+metadata,+images,+tags,+categories.*,+collection,+variants.inventory_quantity,+variants.calculated_price,+variants.options",
|
||||
});
|
||||
|
||||
const response = await medusaFetch<MedusaProductsResponse>(
|
||||
|
||||
Reference in new issue
Block a user