From 24e264d229cc134616d51f5157ee3799beac9d71 Mon Sep 17 00:00:00 2001 From: Chord Date: Sun, 17 May 2020 17:04:19 +0200 Subject: [PATCH] Temporarily disable registration/login for non gm --- api/db.js | 2 +- app/components/Nav.svelte | 4 ++-- app/views/Home.svelte | 4 ++-- app/views/Login.svelte | 1 + app/views/Register.svelte | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/db.js b/api/db.js index d9b7d76..2753f30 100644 --- a/api/db.js +++ b/api/db.js @@ -484,7 +484,7 @@ export async function search(term, pagination) { export async function validate_account(username, password) { try { - const data = await pool.query('SELECT id, passhash FROM accounts WHERE username=$1', [username]); + const data = await pool.query('SELECT id, passhash FROM accounts WHERE username=$1 and gm=true', [username]); if (data.rows.length === 0) { return undefined; diff --git a/app/components/Nav.svelte b/app/components/Nav.svelte index 41d9630..721bdc5 100644 --- a/app/components/Nav.svelte +++ b/app/components/Nav.svelte @@ -36,9 +36,9 @@ -