created login post url

This commit is contained in:
Harsh Singh 2024-08-05 17:34:17 +05:30
parent f4900b999d
commit 275e42757b
4 changed files with 9 additions and 0 deletions

BIN
src/db/db_up.exe Normal file

Binary file not shown.

BIN
src/hh1

Binary file not shown.

BIN
src/hh1.exe Normal file

Binary file not shown.

View file

@ -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")