Separated models, controllers and routers
This commit is contained in:
18
Authenticate/Router.fs
Normal file
18
Authenticate/Router.fs
Normal file
@@ -0,0 +1,18 @@
|
||||
module DredgePos.Authenticate.Router
|
||||
|
||||
open Saturn
|
||||
open Giraffe
|
||||
|
||||
let homepage = (warbler (fun _ -> Controller.loadAuthenticatePage() ))
|
||||
let handlePostRoute<'a> handlerFunction post next ctx = json (handlerFunction ctx post) next ctx
|
||||
|
||||
let pipeline = pipeline{
|
||||
use_warbler
|
||||
}
|
||||
|
||||
let router = router {
|
||||
pipe_through pipeline
|
||||
get "/" homepage
|
||||
get "" homepage
|
||||
post "/authenticateClerk" (bindJson<int> (handlePostRoute Controller.loginWithLoginCode) )
|
||||
}
|
||||
Reference in New Issue
Block a user