Compare commits

..
Author SHA1 Message Date
devops ce4842f375 fix(commerce-backend): corregir tipo de callback en location_levels.find
TS2769: la anotacion explicita {location_id: string} no calzaba con el
tipo Maybe<InventoryLevel> que infiere query.graph para location_levels.
Se quita la anotacion y se deja inferir, con optional chaining.
2026-08-29 18:59:48 +00:00
devops 2cce671049 Merge branch 'feat/inventory-panel' into main
Build and Push Medusa / Construir y publicar Medusa (push) Failing after 4m52s
Build and Push Medusa / Escaneo de Secretos (Gitleaks) (push) Successful in 32s
2026-08-29 17:56:51 +00:00
devops 42c90d8534 chore: release v1.0.216 [skip ci] 2026-08-29 17:10:35 +00:00
2 changed files with 3 additions and 3 deletions

No files matched your search

@@ -49,7 +49,7 @@ export async function GET(req: MedusaRequest, res: MedusaResponse) {
const variant = product.variants?.[0]; const variant = product.variants?.[0];
const inventoryItem = variant?.inventory_items?.[0]; const inventoryItem = variant?.inventory_items?.[0];
const level = inventoryItem?.inventory?.location_levels?.find( const level = inventoryItem?.inventory?.location_levels?.find(
(level: { location_id: string }) => level.location_id === locationId, (candidate) => candidate?.location_id === locationId,
); );
return { return {
productId: product.id, productId: product.id,
@@ -131,7 +131,7 @@ export async function POST(req: MedusaRequest<PanelUpdateBody>, res: MedusaRespo
} }
if (typeof quantity === "number" && inventoryItemId) { if (typeof quantity === "number" && inventoryItemId) {
const level = inventoryItem?.inventory?.location_levels?.find( const level = inventoryItem?.inventory?.location_levels?.find(
(level: { location_id: string }) => level.location_id === locationId, (candidate) => candidate?.location_id === locationId,
); );
await updateInventoryLevelsWorkflow(req.scope).run({ await updateInventoryLevelsWorkflow(req.scope).run({
input: { input: {
@@ -25,7 +25,7 @@ spec:
runAsUser: 1001 runAsUser: 1001
containers: containers:
- name: app - name: app
image: gitea.cruzcloud.net/devops/ecommerce-frontend:v1.0.213 image: gitea.cruzcloud.net/devops/ecommerce-frontend:v1.0.216
env: env:
- name: HEADLESS_PROVIDER - name: HEADLESS_PROVIDER
value: medusa value: medusa