SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
714 stars 108 forks source link

GET requests with getf routing to a controller result in 404 #161

Closed MarneeDear closed 5 years ago

MarneeDear commented 5 years ago

Possibly related to issue #160. I am seeing a similar problem with getf.

Using Controller.Sample. Find my source code here:

https://github.com/MarneeDear/Saturn/blob/delete-routes-404/sample/Controller.Sample/Controller.Sample.fs#L106

This works


let getIntExample (id : int) = text "YOU GOT ME"

//in topRouter

getf "/get/%i/edit" getIntExample

This does not work (404)


//in topRouter

getf "/get/%i/edit" (fun (_ : int) -> userController)
MarneeDear commented 5 years ago

forwardf works, but I am having a problem going through another router. I'm working on a new issue for that.

MarneeDear commented 5 years ago

These work

  //OK
    forwardf "/get/%i/edit" (fun (_ : int) -> userController)
    forwardf "/get/%i/edit" (fun (_:int) -> otherRouter)