Compare commits

...

3 Commits

Author SHA1 Message Date
Jill fa24da1e60 Merge pull request 'replace is_admin with rank in reupload.cr' (#12) from rya/crystal-gauntlet:main into main
Reviewed-on: #12
2024-02-23 12:50:32 +01:00
rya ada2e6096c Merge branch 'main' into main 2024-02-08 13:49:15 +01:00
Jecket f08af7e2b7 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
2024-02-08 09:43:19 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -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