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, | ||||
| 					.handleNotFound = definition.handleNotFound, | ||||
| 					.handleError = definition.handleError, | ||||
| 					.preHandle = definition.preHandle, | ||||
| 					.postHandle = definition.postHandle, | ||||
| 				}); | ||||
| 			} | ||||
| 		else | ||||
|  | @ -203,6 +205,8 @@ pub const RouteNode = struct { | |||
| 				childTree.handle = definition.handle; | ||||
| 				childTree.handleNotFound = definition.handleNotFound; | ||||
| 				childTree.handleError = definition.handleError; | ||||
| 				childTree.preHandle = definition.preHandle; | ||||
| 				childTree.postHandle = definition.postHandle; | ||||
| 
 | ||||
| 				if (definition.children) |children| | ||||
| 					{ // If there are children, recursively parse them. | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue