1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-20 22:19:30 +08:00

add: skip story

This commit is contained in:
0O0o0oOoO00
2025-11-18 18:34:38 +08:00
parent 86226d3592
commit 7793703fbc
17 changed files with 108 additions and 1 deletions

View File

@@ -1026,6 +1026,28 @@ CrackerServer::CrackerServer() {
CRACK_OK();
});
Post("/enable_skip_story", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance().enable_skip_story();
} catch (std::exception& e) {
SPDLOG_ERROR("Enable skip story failed: {}", e.what());
res.status = 500;
return;
}
CRACK_OK();
});
Post("/disable_skip_story", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance().disable_skip_story();
} catch (std::exception& e) {
SPDLOG_ERROR("Disable skip story failed: {}", e.what());
res.status = 500;
return;
}
CRACK_OK();
});
Post("/init", [](const httplib::Request& req, httplib::Response& res) {
try {
Cracker::Instance();