Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smp1 16 #15

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Smp1 16 #15

wants to merge 33 commits into from

Conversation

javiercavalero
Copy link
Collaborator

Ticket {#SMP1-16}

RESUME

  • Solicitud GET a /accounts/:user_id
  • Respuesta: listado de las cuentas asociadas al usuario
  • Este endpoint sólo deberá ser accesible por los usuarios con Role ADMIN

HOW HAS THIS BEEN TESTED?

Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration.

  • [ - ] Postman.

Copy link
Collaborator

@MaiCaiIney MaiCaiIney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • El id 2 para el rol ADMIN es válido solamente en la base de datos local. Lo correcto es recuperar el rol ADMIN y comparar los id o validar que el id recibido corresponde al rol ADMIN, pero no tenes que hardcodear el id porque es el dato dinámico del rol (lo constante es el nombre ADMIN)
  • Está bien el middleware pero no lo estás utilizando (no declarás su uso en el enrutamiento)

Copy link
Collaborator

@MaiCaiIney MaiCaiIney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • En endpoint GET /accounts/:user_id debe estar autenticado, pero en el enrutamiento le quitaste el middleware auth:api
  • Resolver conflictos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants