Skip to content
Snippets Groups Projects
  1. Jul 12, 2017
  2. Jul 10, 2017
  3. Jun 29, 2017
  4. Jun 28, 2017
  5. Jun 27, 2017
  6. May 09, 2017
  7. Apr 26, 2017
  8. Apr 18, 2017
  9. Apr 05, 2017
  10. Mar 22, 2017
  11. Feb 01, 2017
  12. Jan 10, 2017
  13. Oct 27, 2016
  14. Oct 17, 2016
  15. Oct 14, 2016
  16. Oct 03, 2016
  17. Sep 29, 2016
  18. Sep 28, 2016
    • Vytor Calixto's avatar
      Fix cache problem in route /user · a3ae2306
      Vytor Calixto authored
      Changes:
      * Cache is defined in `api.js`, not in `app.js` anymore
      * Enrollment cache lasts for 1 day, states, regions, citys and schools lastas for 15 days
      
      Closes simcaq/SCRUM#58
      a3ae2306
  19. Sep 26, 2016
  20. Sep 23, 2016
  21. Sep 22, 2016
  22. Sep 20, 2016
  23. Sep 15, 2016
  24. Sep 13, 2016
  25. Sep 06, 2016
  26. Sep 02, 2016
  27. Aug 29, 2016
    • 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
  28. Aug 17, 2016
    • João Victor Risso's avatar
      Change API to use ECMAScript6 · 00a87dec
      João Victor Risso authored
      
      Major modifications:
      - Source code is now in the src directory
      - All source files were adapted to ECMAScript6
      - Add Gulpfile and Babel to transcompile the project from ES6 to ES5 (until Node.js fully supports ES6)
      	- By running gulp one generates the build directory with the files transcompiled, from which the API can be run
      - Add ESLint to check for syntax errors and enforce code standards
      	- Javascript coding standard currently adopted is AirBnB with 4 spaces
      - Replace monetdb package with monetdb-pool, which allows for concurrent queries over a pool of connections while maintaining the same interface
      
      TODO (in order of priority, from high to low):
      - Add Gulp tasks to handle automatic building, tests and running the server in order to deprecate using npm
      - Implement decorator to execute the SQL queries and reduce code duplication.
      - Implement SQL query builder (e.g. squel.js) to erradicate the need for embedding SQL directly into the code (which is error-prone).
      - Change enrollments route not to use route chaining in order to decide which SQL query is appropriate to respond the user's request.
      - Implement decorator for API responses and also reduce code duplication.
      - Split up tests into and add more test cases.
      
      Signed-off-by: João Victor Risso's avatarJoão Victor Risso <jvtr12@c3sl.ufpr.br>
      00a87dec
  29. 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
  30. 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
  31. Aug 02, 2016
  32. Jul 12, 2016
Loading