mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-04-28 20:06:24 +02:00
* Use mathieucarbou/MycilaNTP which make the same as the currenet code with further improvements * Remove zones.json file as it is already included in the NTP library now * Remove the "Timezone" property from config as we will only save the time zone name in future (instead of spec + name) * When changing the time zone, the device local time will be updated immidiatly in the web ui
19 lines
573 B
C++
19 lines
573 B
C++
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
|
|
#include <ESPAsyncWebServer.h>
|
|
#include <TaskSchedulerDeclarations.h>
|
|
|
|
class WebApiNtpClass {
|
|
public:
|
|
void init(AsyncWebServer& server, Scheduler& scheduler);
|
|
|
|
private:
|
|
void onNtpStatus(AsyncWebServerRequest* request);
|
|
void onNtpAdminGet(AsyncWebServerRequest* request);
|
|
void onNtpAdminPost(AsyncWebServerRequest* request);
|
|
void onNtpTimeGet(AsyncWebServerRequest* request);
|
|
void onNtpTimePost(AsyncWebServerRequest* request);
|
|
void onNtpTimezonesGet(AsyncWebServerRequest* request);
|
|
};
|