Separated models, controllers and routers
This commit is contained in:
17
Authenticate/Controller.fs
Normal file
17
Authenticate/Controller.fs
Normal file
@@ -0,0 +1,17 @@
|
||||
module DredgePos.Authenticate.Controller
|
||||
|
||||
open Giraffe
|
||||
open DredgeFramework
|
||||
open Microsoft.AspNetCore.Http
|
||||
|
||||
let loadAuthenticatePage (): HttpHandler =
|
||||
let variables = map ["title", "Log In"]
|
||||
let scripts = ["dredgepos.authenticate.js"]
|
||||
let styles = ["dredgepos.authenticate.css"]
|
||||
|
||||
Theme.loadTemplateWithVarsScriptsAndStyles "authenticate" variables scripts styles
|
||||
|> htmlString
|
||||
|
||||
let loginWithLoginCode (context: HttpContext) (login_code: int) =
|
||||
if Model.clerkLogin login_code context then ajaxSuccess "success"
|
||||
else ajaxFail "fail"
|
||||
Reference in New Issue
Block a user