:3
This commit is contained in:
parent
2b69254416
commit
9b2db30a82
6 changed files with 13 additions and 8 deletions
|
@ -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 = %*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue