aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/db/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/server/db/users.js')
-rw-r--r--vnext/server/db/users.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/vnext/server/db/users.js b/vnext/server/db/users.js
new file mode 100644
index 00000000..2201b1ef
--- /dev/null
+++ b/vnext/server/db/users.js
@@ -0,0 +1,14 @@
+import sql from './index'
+
+/**
+ * Count users
+ */
+export async function get_count() {
+ const count = await sql`
+ select
+ count(*)
+ from users
+ where banned=0
+ `
+ return count
+}