nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
591a357
)
lib/nitcorn: force all routes path to begin with a "/" once registered
author
Alexis Laferrière
<alexis.laf@xymus.net>
Wed, 20 Apr 2016 17:48:14 +0000
(13:48 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Thu, 21 Apr 2016 17:19:21 +0000
(13:19 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/nitcorn/server_config.nit
patch
|
blob
|
history
diff --git
a/lib/nitcorn/server_config.nit
b/lib/nitcorn/server_config.nit
index
c2bd614
..
e61caad
100644
(file)
--- a/
lib/nitcorn/server_config.nit
+++ b/
lib/nitcorn/server_config.nit
@@
-61,6
+61,12
@@
class Route
# Path to this action present in the URI
var path: nullable String
# Path to this action present in the URI
var path: nullable String
+ init
+ do
+ var path = path
+ if path != null then self.path = "/" / path
+ end
+
# `Action` to activate when this route is traveled
var handler: Action
end
# `Action` to activate when this route is traveled
var handler: Action
end