Skip to content
Snippets Groups Projects
  1. Sep 02, 2016
  2. Aug 31, 2016
  3. Aug 29, 2016
    • João Victor Risso's avatar
    • João Victor Risso's avatar
      Clear build directory · 9f1da16d
      João Victor Risso authored
      Remove all files from build directory. The rationale is that this
      directory is updated frequently during the development process and might
      add too much 'noise' in the commits in the repository.
      Unverified
      9f1da16d
    • João Victor Risso's avatar
      Refactor source structure and add promise to execute DB queries · ed91f01e
      João Victor Risso authored
      Changes in this commit:
      - Singularize all routes and components
      - Separate different modules into their own source files
      - Rename the API module to enrollment and add a more general API module
      - Resources that are related to a route, are now under its scope. For
        example, the year range of the enrollment component is now under the
        route /v1/enrollment/year_range
      - Implement a thenable function to execute the queries against the
        database to reduce the amount of duplicated code in the application. This
        approach also allows several concurrent queries to run concurrently in the
        same route.
      Unverified
      ed91f01e
  4. Aug 25, 2016
    • Vytor Calixto's avatar
      Add dimensions middleware · 73273083
      Vytor Calixto authored
      EXAMPLE USAGE:
      
      * Use it with no parameters to get all the dimensions in the query: `app.get('/', dimensions(), function(req, res, next){})`
      * Use it with an array of accepted values: `app.get('/', dimensions(['year', 'location']), function(req, res, next){})`
      * Use it globally: `app.use(dimensions())`
      73273083
  5. Aug 17, 2016
  6. Aug 11, 2016
  7. Aug 10, 2016
    • João Victor Risso's avatar
      Add education level and fix issue with adm_dependency_id · 8d77d014
      João Victor Risso authored
      Changelog:
      - Add education level to all queries
      
      - Add route '/education_level' to query the available education levels.
        The response is a set of pairs (id, education_level)
      
      - Change var declarations to their respective const and let counterparts
      
      - Fix wrong foreign key name in the aggregation by states. When a
        adm_dependency_id parameter was supplied, the query would fail.
      Unverified
      8d77d014
  8. Aug 09, 2016
  9. Aug 08, 2016
  10. Aug 03, 2016
    • João Victor Risso's avatar
      Change type verification to typeof · 2c75a3db
      João Victor Risso authored
      Unverified
      2c75a3db
    • João Victor Risso's avatar
    • João Victor Risso's avatar
      Refactor enrollments route to include query building · 1baf5471
      João Victor Risso authored
      Changes:
      - Add error handling in the database query function. When a database error
      occurs, it is logged in the server and a plain text response is returned to the
      user.
      - Implement the building of queries inside the API, which removes the
        need to have stored functions/procedures on the database, which is not
        flexible or efficient to maintain/extend.
      - Use route chaining to determine which function will build the query
        that needs to be executed. The last function is the one that actually
        sends the query to the database and send the response.
      
      Future Work:
      - Instead of returning a plain text response, return a HTTP 501 status,
        which is currently not possible. When one attempts to send such status
        the framework throws an error that the headers were already sent for
        the current request.
      - Chaining based on the route might not be the best solution here.
      Unverified
      1baf5471
Loading