created login post url
This commit is contained in:
parent
f4900b999d
commit
275e42757b
4 changed files with 9 additions and 0 deletions
BIN
src/db/db_up.exe
Normal file
BIN
src/db/db_up.exe
Normal file
Binary file not shown.
BIN
src/hh1
BIN
src/hh1
Binary file not shown.
BIN
src/hh1.exe
Normal file
BIN
src/hh1.exe
Normal file
Binary file not shown.
|
@ -43,6 +43,15 @@ import
|
|||
|
||||
"/:path" -> get:
|
||||
compileTemplateFile(getScriptDir() / "view" / "404.nimja")
|
||||
"/login"-> post:
|
||||
var em =ctx.urlForm["email"]
|
||||
var ps=ctx.urlForm["password"]
|
||||
let conn=newTurso()
|
||||
var temp=getUser(conn,em,ps)
|
||||
if temp[0]:
|
||||
ctx.redirect("/")
|
||||
else:
|
||||
echo "user not found"
|
||||
|
||||
servePublic("src/public", "/static")
|
||||
|
||||
|
|
Loading…
Reference in a new issue