This commit is contained in:
hexlocation 2024-12-28 21:51:06 +01:00
parent 2b69254416
commit 9b2db30a82
Signed by: hex
GPG key ID: A19EFFAAF8C00FCF
6 changed files with 13 additions and 8 deletions

View file

@ -15,8 +15,6 @@ sql"""CREATE TABLE IF NOT EXISTS keys(
)""")
proc index*(ctx: Context) {.async.} =
for x in db.fastRows(sql"SELECT * FROM keys"):
echo x
await ctx.staticFileResponse("public/index.html", "")
proc ip_exists*(ip: string): bool =
@ -46,7 +44,7 @@ proc gentry*(ctx: Context) {.async.} =
ip_exists(ctx.request.hostName)) and not table_empty()) and not debug:
err = true
else:
generate_referral(key,referral, ctx.request.hostName, $ctx.request.getHeader("header"))
generate_referral(key,referral, ctx.request.hostName, $ctx.request.getHeader("referral"))
err = false
var info = %*