There was a problem fetching the pipeline summary.
Merge branch 'refactor_enrollments' into 'development'
Refactor enrollments route to include query building 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 building of SQL queries inside the API, which removes the need to have stored functions/procedures on the database, since the former approach 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. See merge request !7
No related branches found
No related tags found
Pipeline #
Showing
- .babelrc 1 addition, 0 deletions.babelrc
- .eslintignore 3 additions, 0 deletions.eslintignore
- .eslintrc.json 14 additions, 0 deletions.eslintrc.json
- .gitignore 3 additions, 1 deletion.gitignore
- .gitlab-ci.yml 2 additions, 1 deletion.gitlab-ci.yml
- README.md 24 additions, 0 deletionsREADME.md
- config.json 3 additions, 1 deletionconfig.json
- gulpfile.babel.js 72 additions, 0 deletionsgulpfile.babel.js
- libs/app.js 0 additions, 55 deletionslibs/app.js
- libs/config.js 0 additions, 9 deletionslibs/config.js
- libs/middlewares/query.js 0 additions, 16 deletionslibs/middlewares/query.js
- libs/routes/api.js 0 additions, 138 deletionslibs/routes/api.js
- libs/routes/cities.js 0 additions, 42 deletionslibs/routes/cities.js
- libs/routes/regions.js 0 additions, 38 deletionslibs/routes/regions.js
- libs/routes/states.js 0 additions, 44 deletionslibs/routes/states.js
- package.json 28 additions, 6 deletionspackage.json
- server.js 0 additions, 13 deletionsserver.js
- src/libs/app.js 34 additions, 0 deletionssrc/libs/app.js
- src/libs/config.js 7 additions, 0 deletionssrc/libs/config.js
- src/libs/db/monet.js 22 additions, 0 deletionssrc/libs/db/monet.js
.babelrc
0 → 100644
.eslintignore
0 → 100644
.eslintrc.json
0 → 100644
gulpfile.babel.js
0 → 100644
libs/app.js
deleted
100644 → 0
libs/config.js
deleted
100644 → 0
libs/middlewares/query.js
deleted
100644 → 0
libs/routes/api.js
deleted
100644 → 0
libs/routes/cities.js
deleted
100644 → 0
libs/routes/regions.js
deleted
100644 → 0
libs/routes/states.js
deleted
100644 → 0
server.js
deleted
100644 → 0
src/libs/app.js
0 → 100644
src/libs/config.js
0 → 100644
Please register or sign in to comment