Repository navigation
Documentar calificacion a deliveries y correcion a la solicitud de pe… - #142
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughSe implementa la funcionalidad de reseñas de entregas mediante la adición de esquemas OpenAPI, la actualización del servicio de entregas para filtrar asignaciones pendientes con datos expandidos, la inclusión de información de entrega en la sesión del usuario, y la documentación Swagger de los endpoints asociados. ChangesFuncionalidad de Reseñas de Entregas
Sequence DiagramsequenceDiagram
participant Client
participant Controller
participant Session
participant Service
participant Database
Client->>Controller: GET /pending-delivery-reviews
Controller->>Session: Obtener user.id_user
Session->>Database: Cargar usuario + delivery + store
Database-->>Session: Usuario con id_delivery y id_store
Session-->>Controller: id_user disponible
Controller->>Service: getPendingAssignmentsService(deliveryId, id_user)
Service->>Database: Consultar entregas con status=true<br/>filtradas por id_user (opcional)
Database-->>Service: Entregas + asignaciones pendientes<br/>+ órdenes expandidas<br/>+ detalles tienda/usuario/items
Service-->>Controller: Asignaciones pendientes enriquecidas
Controller-->>Client: JSON con reseñas pendientes (200)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/modules/delivery/delivery/delivery.service.js`:
- Around line 84-89: La función getPendingAssignmentsService permite bypass de
autorización porque omite el filtro fk_user cuando authUserId es null/undefined;
cambia la firma para hacer authUserId obligatorio (elimina el comportamiento
nullish), validar al inicio de getPendingAssignmentsService que authUserId está
presente y, si no lo está, lanzar un error (p. ej. throw new Error('authUserId
is required') o un error HTTP adecuado), y ajustar la consulta
prisma.deliveries.findFirst para siempre incluir { fk_user: authUserId } en
where; si necesitas soporte para administradores, añade un parámetro explícito
como bypassOwnership con autorización separada en lugar de permitir
null/undefined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ac028ebf-f6bb-4890-91fb-3ae5b868da58
📒 Files selected for processing (7)
src/config/swagger.config.jssrc/docs/schemas/index.jssrc/docs/schemas/order.schema.jssrc/modules/delivery/delivery/delivery.controller.jssrc/modules/delivery/delivery/delivery.service.jssrc/modules/session/controllers/session.controllers.jssrc/modules/users/orders/order.routes.js
|
eli tenes conflictos |
|



…dido
Summary by CodeRabbit
Notas de Lanzamiento
New Features
Documentation