Contribución: creando endpoint que regresa lista de explorers filtrados por stack #165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribución Open Source
Se agregó un nuevo endpoint con la url
localhost:3000/v1/explorers/stack/javascript
que regresará un arreglo con los explorers que tengan javascript dentro del mismo.Para esta pequeña contribución, se realizó lo siguiente:
/lib/services/ExplorerService.js
un método denominadogetExplorersByStack(explorers, mission)
que regresa dicha lista filtrada por stack. (Tests incluídos entest/services/ExplorerService.test.js
para corroborar funcionalidad de código legado).getExplorersByStack(mission)
en el controladorlib/controllers/ExplorerController.js
extendiendo la funcionalidad de la clase. (Tests incluídos entest/controllers/ExplorerController.test.js
) para corroborar funcionalidad de código legado.lib/server.js
, regresando un objeto con la tecnología y los explorers resultantes por stack. (Tests incluídos entest/controllers/ExplorerController.test.js
) para corroborar funcionalidad de endpoints legados e implementado.