mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 19:19:25 +08:00
add: auto once again
This commit is contained in:
@@ -1234,6 +1234,28 @@ CrackerServer::CrackerServer() {
|
||||
CRACK_OK();
|
||||
});
|
||||
|
||||
Post("/enable_auto_once_again", [](const httplib::Request& req, httplib::Response& res) {
|
||||
try {
|
||||
Cracker::Instance().enable_auto_once_again();
|
||||
} catch (std::exception& e) {
|
||||
SPDLOG_ERROR("Enable auto once again failed: {}", e.what());
|
||||
res.status = 500;
|
||||
return;
|
||||
}
|
||||
CRACK_OK();
|
||||
});
|
||||
|
||||
Post("/disable_auto_once_again", [](const httplib::Request& req, httplib::Response& res) {
|
||||
try {
|
||||
Cracker::Instance().disable_auto_once_again();
|
||||
} catch (std::exception& e) {
|
||||
SPDLOG_ERROR("Disable auto once again failed: {}", e.what());
|
||||
res.status = 500;
|
||||
return;
|
||||
}
|
||||
CRACK_OK();
|
||||
});
|
||||
|
||||
Post("/init", [](const httplib::Request& req, httplib::Response& res) {
|
||||
try {
|
||||
Cracker::Instance();
|
||||
|
||||
Reference in New Issue
Block a user