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

Node Course exam finished #12

Open
wants to merge 1 commit into
base: glmaljkovich-patch-1
Choose a base branch
from

Conversation

ValentinBonani
Copy link

@ValentinBonani ValentinBonani commented Mar 21, 2019

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?

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.

1 participant