Skip to content

Conversation

@AZapata27
Copy link

📝 Description

This PR introduces the following changes:

  • Added endpoint to retrieve all players.
  • Implemented unit tests for the GetAllPlayers handler.
  • Created mock implementation for PlayerRepository to facilitate testing.
  • Adjusted GetAllPlayers handler to return 204 No Content when no players are found.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • Existing unit tests pass locally with my changes
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

- Added handler function to retrieve all players.
- Implemented service method to retrieve all players.
- Implemented repository method to retrieve all players.
- Adjusted error handling in repository methods.
- Corrected struct definitions and usage in repository and service layers.
- Adjusted `GetAllPlayers` handler to return `204 No Content` when no players are found.
- Added unit tests for the `GetAllPlayers` handler.
- Created mock implementation for `PlayerRepository` to facilitate testing.
- Added unit tests for the `GetAllPlayers` handler.
- Created mock implementation for `PlayerRepository` to facilitate testing.
- Added unit tests for the `GetAllPlayers` handler.
- Created mock implementation for `PlayerRepository` to facilitate testing.
@DarcoProgramador
Copy link
Collaborator

No hay ninguna issue creada para este flow, así que te creare una nueva issue

@DarcoProgramador DarcoProgramador linked an issue Sep 6, 2024 that may be closed by this pull request
@DarcoProgramador DarcoProgramador changed the title Feature Get All Players Feature #59 Get All Players Sep 6, 2024
Copy link
Collaborator

@DarcoProgramador DarcoProgramador left a comment

Choose a reason for hiding this comment

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

Buen código 👍, me parece excelente. Aunque la issue de este flow no estaba creada. puede servirnos mas tarde tener un GetAllPlayers.
Solo faltaría corregir el comentario para el go doc y añadir el comentario para la doc de swagger y listo.

@AZapata27
Copy link
Author

Gracias por los comentarios @DarcoProgramador estoy en camino de subir de nivel con GO y me gustaría colaborar en la comunidad.

Reviews ajustadas ok 👍🏼

Copy link
Collaborator

@DarcoProgramador DarcoProgramador left a comment

Choose a reason for hiding this comment

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

Tienes que buildear de nuevo el mock ya que el linter y los test dan error ya que no existe la función GetAll en los mock de Players

@AZapata27
Copy link
Author

ajustado el mock

@jairogloz jairogloz self-requested a review September 29, 2024 19:44
Copy link
Owner

@jairogloz jairogloz left a comment

Choose a reason for hiding this comment

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

Una pregunta, este endpoint retorna toooodos los players en la base de datos, cierto? 🤔

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.

Get AllPlayers full flow

3 participants