diff --git a/config b/config
index 67f66d6..09b2705 100644
--- a/config
+++ b/config
@@ -1,7 +1,7 @@
server {
port 3117
- debug true
- http_logging true
+ debug false
+ http_logging false
static_prefix "public"
}
diff --git a/data/dk.db b/data/dk.db
index 5bbc180..12d6d14 100644
Binary files a/data/dk.db and b/data/dk.db differ
diff --git a/fs/templates/admin/edit_user.html b/fs/templates/admin/edit_user.html
index f8d416c..1f8c13f 100644
--- a/fs/templates/admin/edit_user.html
+++ b/fs/templates/admin/edit_user.html
@@ -7,13 +7,11 @@
Verified?
-
+
-
+
- {{ local vtoken = user.verify_token }}
- {{ if vtoken == "" then vtoken = "Verification Token" end }}
diff --git a/fs/templates/admin/layout.html b/fs/templates/admin/layout.html
index 2efc06b..1b3cf41 100644
--- a/fs/templates/admin/layout.html
+++ b/fs/templates/admin/layout.html
@@ -62,7 +62,7 @@
$.get({
url: url,
- headers: { 'X-DK-AJAX': '1' },
+ headers: { 'X-Dk-Ajax': '1' },
dataType: 'json'
}).done(function(response) {
$('#main').html(response.html)
diff --git a/libs/admin.lua b/libs/admin.lua
index ddf0be2..82788fe 100644
--- a/libs/admin.lua
+++ b/libs/admin.lua
@@ -14,7 +14,7 @@ function m.page(template, page_title, ext_data)
data.html = render(fs_read("templates/admin/"..template), data)
- if ctx.headers["X-DK-AJAX"] then return data end
+ if ctx.headers["X-Dk-Ajax"] then return data end
return send_html(render(fs_read("templates/admin/layout.html"), data))
end
diff --git a/moonshark b/moonshark
index 2bdbea8..740c3f2 100755
Binary files a/moonshark and b/moonshark differ
diff --git a/routes/admin/news/get.lua b/routes/admin/news/get.lua
index 95bfcc7..ce566db 100644
--- a/routes/admin/news/get.lua
+++ b/routes/admin/news/get.lua
@@ -1,5 +1,4 @@
local a = require("admin")
-
local d = sqlite("dk"):get_one("SELECT username FROM users WHERE id = :i", {i = session_get("user_id")})
return a.page("news.html", "News", {username = d.username})
diff --git a/routes/admin/users/[id]/get.lua b/routes/admin/users/[id]/get.lua
index cff62ea..c265c6d 100644
--- a/routes/admin/users/[id]/get.lua
+++ b/routes/admin/users/[id]/get.lua
@@ -6,4 +6,13 @@
local a = require("admin")
local user = sqlite("dk"):get_one("SELECT * FROM users WHERE id = :i", {i = ctx.params.id})
-return a.page("edit_user.html", "editing "..user.username, {user = user})
+
+local vtoken = user.verify_token
+if vtoken == "" then vtoken = "Verification Token" end
+
+return a.page("edit_user.html", "editing "..user.username, {
+ user = user,
+ verified_yes = to_bool(user.verified) and "checked" or "",
+ verified_no = not to_bool(user.verified) and "checked" or "",
+ vtoken = vtoken
+})