добавил sha256 для файла обновления
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "terminal_api_driver.h"
|
||||
#include "auth/resources.h"
|
||||
#include "auth/jwt.h"
|
||||
#include "auth/utils.h"
|
||||
|
||||
|
||||
namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp>
|
||||
@@ -347,7 +348,9 @@ public:
|
||||
rep.headers.push_back({.name = "Content-Type", .value = toString(mime_types::json)});
|
||||
std::string result = R"({"status":"ok","fwsize":)";
|
||||
result += std::to_string(req.payload.size());
|
||||
result += "}";
|
||||
result += ",\"sha256\":\"";
|
||||
result += http::utils::sha256(req.payload.data(), req.payload.size());
|
||||
result += "\"}";
|
||||
rep.content.insert(rep.content.end(), result.c_str(), result.c_str() + result.size());
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user