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.
Name: Valentin Bonani
Explain your solution
Tell us how you solved each of the excercises.
Excercise 1 - Add filter by technologyId for GET /courses endpoint
Reading the code, i realised there was an array that had the the params to filter, so i just added "technologyId" to that array.
Excercise 2 - create a GET /admin/billing/getInvoices
First I make a request to the endpoint /admin/billing/getChargeableStudents. From that response I can get the students in debt, and send it to the AFIP service to get the corresponding billing id for each student. Finally sending the sctructured response
Excercise 3 - Add Middleware for caching GET requests
I created a middleware that has a dictionary with all the cached data that is checked everytime it gets a GET request, with the key being the GET url. If is not cached, it redefines the response200 method to add it to the cache before responding. If the Method is POST or PUT, it erases all respective data
Excercise 4 - create GET /stats/failuresByStates
Got all evaluations from the DB and then filtered the notes that were failed, then getting all those students taking into account this can result on duplicated students, I decided to use a dictionary structure to map each student with his corresponding state.
Share your ideas about the application
Would you change anything about how the app was designed?
What else would you add to it?