From f08af7e2b74c8295c4a43a172279292e4db3327c Mon Sep 17 00:00:00 2001 From: Jecket <35532868+Jecket22@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:43:19 +0100 Subject: [PATCH] replace is_admin with rank in reupload.cr why is the reupload account supposed to be an admin wtf; also probably need to update 3_accounts.sql to remove is_admin alltogether --- src/lib/reupload.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/reupload.cr b/src/lib/reupload.cr index 1b8d38c..9b372a8 100644 --- a/src/lib/reupload.cr +++ b/src/lib/reupload.cr @@ -11,7 +11,7 @@ module CrystalGauntlet::Reupload LOG.debug { "reupload acc id #{@@reupload_acc_id}" } rescue next_id = IDs.get_next_id("accounts") - DATABASE.exec("insert into accounts (id, username, password, gjp2, email, is_admin, messages_enabled, friend_requests_enabled, comments_enabled) values (?, ?, ?, ?, ?, ?, ?, ?, ?)", next_id, REUPLOAD_ACC_USERNAME, "!", "!", "", 1, 0, 0, 0) + DATABASE.exec("insert into accounts (id, username, password, gjp2, email, rank, messages_enabled, friend_requests_enabled, comments_enabled) values (?, ?, ?, ?, ?, ?, ?, ?, ?)", next_id, REUPLOAD_ACC_USERNAME, "!", "!", "", 2, 0, 0, 0) DATABASE.exec("insert into users (id, udid, account_id, registered, username) values (?, ?, ?, ?, ?)", IDs.get_next_id("users"), nil, next_id, 1, REUPLOAD_ACC_USERNAME) LOG.debug { "created reupload acc id #{next_id}" } @@reupload_acc_id = next_id