[World CLI] Refactor world CLI to be easier to reason about (#2441)

This commit is contained in:
Chris Miles
2022-09-28 03:04:09 -05:00
committed by GitHub
parent 7ac8fe17e5
commit 9d766bf5dc
17 changed files with 549 additions and 638 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "../../common/repositories/zone_repository.h"
void WorldserverCLI::TestRepository2(int argc, char **argv, argh::parser &cmd, std::string &description)
{
description = "Test command";
if (cmd[{"-h", "--help"}]) {
return;
}
auto zones = ZoneRepository::GetWhere(content_db, "short_name = 'anguish'");
for (auto &zone: zones) {
LogInfo(
"Zone [{}] long_name [{}] id [{}]",
zone.short_name,
zone.long_name,
zone.id
);
}
}