Correctly add pre handlers and post handlers to routes nodes.
This commit is contained in:
parent
0e9cdcb6eb
commit
4649021978
1 changed files with 4 additions and 0 deletions
|
@ -195,6 +195,8 @@ pub const RouteNode = struct {
|
||||||
.handle = definition.handle,
|
.handle = definition.handle,
|
||||||
.handleNotFound = definition.handleNotFound,
|
.handleNotFound = definition.handleNotFound,
|
||||||
.handleError = definition.handleError,
|
.handleError = definition.handleError,
|
||||||
|
.preHandle = definition.preHandle,
|
||||||
|
.postHandle = definition.postHandle,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -203,6 +205,8 @@ pub const RouteNode = struct {
|
||||||
childTree.handle = definition.handle;
|
childTree.handle = definition.handle;
|
||||||
childTree.handleNotFound = definition.handleNotFound;
|
childTree.handleNotFound = definition.handleNotFound;
|
||||||
childTree.handleError = definition.handleError;
|
childTree.handleError = definition.handleError;
|
||||||
|
childTree.preHandle = definition.preHandle;
|
||||||
|
childTree.postHandle = definition.postHandle;
|
||||||
|
|
||||||
if (definition.children) |children|
|
if (definition.children) |children|
|
||||||
{ // If there are children, recursively parse them.
|
{ // If there are children, recursively parse them.
|
||||||
|
|
Loading…
Reference in a new issue