Skip to content

Commit 4b11b55

Browse files
Make controler sample bit more complex (testing site map generation)
1 parent 1edfbd3 commit 4b11b55

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sample/Controller.Sample/Controller.Sample.fs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,17 @@ let userController = controller {
3333
edit (fun (ctx, id) -> (sprintf "Edit handler no version - %i" id) |> Controller.text ctx)
3434
}
3535

36-
let topRouter = scope {
36+
let otherRouter = scope {
37+
get "/dsa" (text "")
38+
getf "/dsa/%s" (text)
39+
forwardf "/ddd/%s" (fun (a : string) -> userControllerVersion1)
3740
not_found_handler (setStatusCode 404 >=> text "Not Found")
41+
}
3842

43+
let topRouter = scope {
3944
forward "/users" userControllerVersion1
4045
forward "/users" userController
46+
forwardf "/%s/%s/abc" (fun (a : string * string) -> otherRouter)
4147
}
4248

4349
let app = application {

0 commit comments

Comments
 (0)