File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ module Controller =
4444 let lst =
4545 choose [
4646 yield GET >=> choose [
47- if state.Index.IsSome then yield route " /" >=> ( fun _ ctx -> state.Index.Value( ctx))
4847 if state.Add.IsSome then yield route " /add" >=> ( fun _ ctx -> state.Add.Value( ctx))
4948 if state.Edit.IsSome then
5049 match typ with
@@ -64,6 +63,9 @@ module Controller =
6463 | Int64 -> yield routef " /%d " ( fun input _ ctx -> state.Show.Value( ctx, unbox< 'Key> input) )
6564 | Float -> yield routef " /%f " ( fun input _ ctx -> state.Show.Value( ctx, unbox< 'Key> input) )
6665 | Guid -> yield routef " /%O " ( fun input _ ctx -> state.Show.Value( ctx, unbox< 'Key> input) )
66+ if state.Index.IsSome then
67+ yield route " " >=> ( fun _ ctx -> ctx.Request.Path <- PathString( ctx.Request.Path.ToString() + " /" ); state.Index.Value( ctx))
68+ yield route " /" >=> ( fun _ ctx -> state.Index.Value( ctx))
6769 ]
6870 yield POST >=> choose [
6971 if state.Create.IsSome then yield route " /" >=> ( fun _ ctx -> state.Create.Value( ctx))
You can’t perform that action at this time.
0 commit comments