chore(dashboard): remove the Maintenance page

The page held one-off repairs from Nexus Dashboard (approve known pet
names, find/delete orphaned pet names, remove every buff, fix property
clone IDs, list mission rewards without a commendation price). Removed
the page, its sidebar entry, its /api/maintenance/* routes, the
`maintenance` permission and the two database calls only it used
(GetAllPetNames, FixPropertyCloneIds). The scheduled tasks (lift expired
bans, fill in pet owners, approve known pet names) and property model
import/removal stay.

Check: the Admin sidebar group has no Maintenance link; /maintenance is
a 404; the Tasks page still lists "Approve known pet names" and "Fill in
pet owners"; property import still works; the Permissions page no
longer lists "Data maintenance".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-28 23:19:41 -05:00
parent 7440e5744d
commit b0dab03807
14 changed files with 5 additions and 297 deletions

View File

@@ -333,10 +333,8 @@ public:
nlohmann::json GetCloneOwners(const std::vector<uint32_t>& clones) override;
nlohmann::json GetCloneVisitors(uint32_t zoneId, uint32_t cloneId, int64_t from, int64_t to, uint32_t limit) override;
uint32_t ApprovePreviouslyApprovedPetNames() override;
std::vector<std::pair<LWOOBJID, std::string>> GetAllPetNames() override;
void ForEachCharacterXml(const std::function<void(LWOOBJID, const std::string&)>& visit) override;
void ForEachCharacterXmlContaining(const std::string& needle, const std::function<void(LWOOBJID, const std::string&)>& visit) override;
uint32_t FixPropertyCloneIds() override;
std::optional<IAccountEmails::EmailInfo> GetAccountEmail(const uint32_t accountId) override;
void SetAccountEmail(const uint32_t accountId, const std::string_view email, const bool confirmed) override;
std::optional<uint32_t> GetAccountIdByConfirmedEmail(const std::string_view email) override;

View File

@@ -339,13 +339,6 @@ uint32_t MySQLDatabase::ApprovePreviouslyApprovedPetNames() {
"(SELECT name FROM (SELECT pet_name AS name FROM pet_names WHERE approved = 2) AS approved_names);"));
}
std::vector<std::pair<LWOOBJID, std::string>> MySQLDatabase::GetAllPetNames() {
std::vector<std::pair<LWOOBJID, std::string>> pets;
auto result = ExecuteSelect("SELECT id, pet_name FROM pet_names;");
while (result->next()) pets.emplace_back(result->getInt64("id"), std::string(result->getString("pet_name").c_str()));
return pets;
}
void MySQLDatabase::ForEachCharacterXml(const std::function<void(LWOOBJID, const std::string&)>& visit) {
auto result = ExecuteSelect("SELECT id, xml_data FROM charxml;");
while (result->next()) visit(result->getInt64("id"), std::string(result->getString("xml_data").c_str()));
@@ -355,10 +348,3 @@ void MySQLDatabase::ForEachCharacterXmlContaining(const std::string& needle, con
auto result = ExecuteSelect("SELECT id, xml_data FROM charxml WHERE LOCATE(?, xml_data) > 0;", needle);
while (result->next()) visit(result->getInt64("id"), std::string(result->getString("xml_data").c_str()));
}
uint32_t MySQLDatabase::FixPropertyCloneIds() {
return static_cast<uint32_t>(ExecuteUpdate(
"UPDATE properties SET clone_id = (SELECT c.prop_clone_id FROM charinfo c WHERE c.id = properties.owner_id) "
"WHERE EXISTS (SELECT 1 FROM charinfo c WHERE c.id = properties.owner_id AND c.prop_clone_id IS NOT NULL "
"AND (properties.clone_id IS NULL OR c.prop_clone_id != properties.clone_id));"));
}