Minor cleanup, add missing command for updating OTA credentials

This commit is contained in:
Lorow
2025-05-25 16:31:42 +02:00
parent cd2791ba6f
commit b5c6bc3765
7 changed files with 48 additions and 19 deletions

View File

@@ -103,7 +103,7 @@ void RestAPI::handle_update_device(RequestContext *context) {
return;
}
auto const result = command_manager->executeFromType(CommandType::UPDATE_DEVICE, context->body);
auto const result = command_manager->executeFromType(CommandType::UPDATE_OTA_CREDENTIALS, context->body);
auto const code = result.isSuccess() ? 200 : 500;
mg_http_reply(context->connection, code, JSON_RESPONSE, result.getResult().c_str());
}