This commit is contained in:
Aritra Banik 2024-03-11 01:52:20 +05:30
parent c24f4c6fe6
commit da5e05fb44
2 changed files with 22 additions and 11 deletions

View File

@ -6,7 +6,7 @@ import
strutils,
./a3pkg/[models, mics],
./a3c/[users],
./[admin, cart, about, index, checkout, validation, contact, shop]
./[admin, cart, about, index, checkout, validation, contact, shop, signup]
"/" -> [get, post]: ctx.index()
@ -34,16 +34,7 @@ import
"/shop" -> get: ctx.shop()
"/shop-single" -> get: ctx.shopSingle()
"/login" -> get:
var
loginError = ""
emailError = ""
passwordError = ""
email = ""
password = ""
compileTemplateFile(getScriptDir() / "a3a" / "login.nimja")
"/login" -> get: ctx.getLogin()
"/login" -> post:
var

20
src/signup.nim Normal file
View File

@ -0,0 +1,20 @@
import
mike,
segfaults,
os,
nimja/parser,
strutils,
./a3pkg/[models, mics],
./a3c/[users]
proc getLogin*(ctx: Context): string=
var
loginError = ""
emailError = ""
passwordError = ""
email = ""
password = ""
compileTemplateFile(getScriptDir() / "a3a" / "login.nimja")