Commit Graph

46 Commits

Author SHA1 Message Date
Eneko Lakasta
5db0e9c8d8 add middleware for apikeyToken 2018-02-15 12:50:42 +01:00
Daniel García Aubert
1ba240d099 Rename middleware function 2018-01-03 13:15:11 +01:00
Daniel García Aubert
dfef7ff3c0 Use spread assignment 2017-12-29 18:45:45 +01:00
Daniel García Aubert
adb9e55fb2 Avoid snake_case notation 2017-12-29 16:30:42 +01:00
Daniel García Aubert
5d3726de44 Use original variable name 2017-12-29 16:24:38 +01:00
Daniel García Aubert
f186e4736b Use template string 2017-12-29 16:19:00 +01:00
Daniel García Aubert
a00c2b1eef Now main middlewares return a named function with the right context bound 2017-12-29 16:15:48 +01:00
Daniel García Aubert
64d601179d Use const instead of var 2017-12-29 15:22:17 +01:00
Daniel García Aubert
cf2b73e473 Move to up intermediate middlewares 2017-12-29 15:19:52 +01:00
Daniel García Aubert
70932c23df Remove step and assert dependencies 2017-12-29 15:17:29 +01:00
Daniel García Aubert
519d49bd10 Remove finish function and respond in the main middleware 2017-12-29 15:04:44 +01:00
Daniel García Aubert
bf814c4442 keep error label 2017-12-29 13:05:01 +01:00
Daniel García Aubert
f136993c50 Use checkContentType middleware 2017-12-29 12:44:56 +01:00
Daniel García Aubert
ba008ab518 Remove unused function 2017-12-29 12:36:56 +01:00
Daniel García Aubert
e4ed6ee1cc Use authorizedByAPIKey middleware 2017-12-29 12:34:50 +01:00
Daniel García Aubert
fda7661dad Create authorizedByAPIKey middleware 2017-12-29 12:23:52 +01:00
Daniel García Aubert
b6c405bf68 Remove send method in base controller and remove BaseController class 2017-10-30 19:28:40 +01:00
Simon Martín
06138a82a8 Merge branch 'middlewarify' into res-locals 2017-10-05 17:53:15 +02:00
Daniel García Aubert
b93c09959c Back to use just one router 2017-10-05 12:12:21 +02:00
Simon Martín
21720267cf from req.context to res.locals 2017-10-03 17:47:57 +02:00
Daniel García Aubert
4899c7ffef Inject prepare context middleware to controllers 2017-09-25 19:40:27 +02:00
Daniel García Aubert
0bdeee64a7 Use express router to group controllers' enpoints and reuse common middleware for named maps admin controller 2017-09-22 16:45:34 +02:00
Daniel García Aubert
daeae5d95c Implement error-middleware to handle errors at top level 2017-09-21 11:46:42 +02:00
Raul Ochoa
cad02bfad7 Remove all conditional branches to call req.profiler
req.profiler is created in a middleware for all requests.
2017-03-30 20:31:53 +02:00
Daniel García Aubert
178345ab12 Fixed typo 2016-03-14 11:18:32 +01:00
Daniel García Aubert
052b58ab90 Moved turbo-cartocss integration from named maps admin to named map provider 2016-03-11 18:28:14 +01:00
Daniel García Aubert
cc5443152b Now turbo-cartocss is also parsed in template modification. 2016-03-11 11:06:51 +01:00
Daniel García Aubert
dab4b6d56b Implemented integration of turbo-cartocss for named maps 2016-03-10 20:45:00 +01:00
Raul Ochoa
3181bcc63e Remove app dependency from controllers 2015-09-30 18:00:54 +02:00
Raul Ochoa
9cd67f06c1 User extraction from request middleware
Used only where potentially a user is required.

It doesn't make sense to extract a user for request that don't need
a user in the context.
2015-09-30 17:17:01 +02:00
Raul Ochoa
d93abe8e7d Change to delete 2015-09-17 02:05:47 +02:00
Raul Ochoa
a4ba21f9db Call send with correct params 2015-09-17 02:05:25 +02:00
Raul Ochoa
38e422e84c Moves sendError and sendResponse to Base controller
Test for findStatusCode moved to controller
2015-09-16 21:54:56 +02:00
Raul Ochoa
e32ced107e Fix all ported tests related to req2params 2015-09-16 18:09:39 +02:00
Raul Ochoa
352dc6b311 BaseController to encapsulate req2params method
All controllers now extending BaseController
- Most of the acceptance ported tests will be broken
2015-09-16 16:18:26 +02:00
Raul Ochoa
62f428f434 Remove app dependency 2015-09-16 01:48:54 +02:00
Raul Ochoa
ad2ebc11dd Remove unused require 2015-09-16 01:39:15 +02:00
Raul Ochoa
72a0c4a487 New sendResponse and sendError methods
- fixes response for static named map error cases
2015-09-16 01:36:51 +02:00
Raul Ochoa
fba5a35514 Move sendResponse and sendError to response object 2015-09-15 19:28:02 +02:00
Raul Ochoa
9c6c63c167 More strict jshint 2015-07-15 15:03:28 +02:00
Raul Ochoa
b05701be61 Authentication/Authorization moves to its own entity 2015-07-13 15:05:03 +02:00
Raul Ochoa
9bece712a9 Splits controllers and supports after layergroup creation actions 2015-07-10 11:24:32 +02:00
Raul Ochoa
6e0678e084 better style 2015-07-10 01:31:06 +02:00
Raul Ochoa
c81048312d Context with user 2015-07-08 15:34:46 +02:00
Raul Ochoa
fa84813a37 Manage cors with a middleware 2015-07-08 13:27:56 +02:00
Raul Ochoa
8cd3807100 Split named maps administration from instantiation/usage 2015-07-08 13:11:57 +02:00