1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-22 01:09:33 +08:00

add: chapter force enable auto fight

This commit is contained in:
0O0o0oOoO00
2025-11-16 18:04:18 +08:00
parent 9cad468c0e
commit dedfe0650a
17 changed files with 135 additions and 1 deletions

View File

@@ -916,6 +916,28 @@ CrackerServer::CrackerServer() {
CRACK_OK();
});
Post("/enable_chapter_force_enable_auto_fight", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance().enable_chapter_force_enable_auto_fight();
} catch (std::exception& e) {
SPDLOG_ERROR("Enable chapter force enable auto fight failed: {}", e.what());
res.status = 500;
return;
}
CRACK_OK();
});
Post("/disable_chapter_force_enable_auto_fight", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance().disable_chapter_force_enable_auto_fight();
} catch (std::exception& e) {
SPDLOG_ERROR("Disable chapter force enable auto fight failed: {}", e.what());
res.status = 500;
return;
}
CRACK_OK();
});
Post("/init", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance();