mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-19 08:42:34 +01:00
Implement readonly security for API endpoints
This commit is contained in:
@@ -29,6 +29,10 @@ void WebApiNtpClass::loop()
|
||||
|
||||
void WebApiNtpClass::onNtpStatus(AsyncWebServerRequest* request)
|
||||
{
|
||||
if (!WebApi.checkCredentialsReadonly(request)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AsyncJsonResponse* response = new AsyncJsonResponse();
|
||||
JsonObject root = response->getRoot();
|
||||
const CONFIG_T& config = Configuration.get();
|
||||
|
||||
Reference in New Issue
Block a user