mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-20 06:53:45 +02:00
Implement get config command and api endpoint for testing purposes
This commit is contained in:
@@ -121,7 +121,8 @@ void RestAPI::handle_update_camera(RequestContext *context)
|
||||
|
||||
void RestAPI::handle_get_config(RequestContext *context)
|
||||
{
|
||||
mg_http_reply(context->connection, 200, JSON_RESPONSE, "{%m:%m}", MG_ESC("result"), "Device config updated");
|
||||
auto result = this->command_manager->executeFromType(CommandType::GET_CONFIG, "");
|
||||
mg_http_reply(context->connection, 200, JSON_RESPONSE, "{%m:%m}", MG_ESC("result"), result.getResult());
|
||||
}
|
||||
|
||||
// resets
|
||||
|
||||
Reference in New Issue
Block a user