mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Telegram
This commit is contained in:
13
src/Web.cpp
13
src/Web.cpp
@@ -229,14 +229,23 @@ void web_init() {
|
||||
//==============================push settings=============================================
|
||||
if (request->hasArg("telegramApi")) {
|
||||
jsonWriteStr(configSetupJson, "telegramApi", request->getParam("telegramApi")->value());
|
||||
//telegramInit();
|
||||
saveConfig();
|
||||
request->send(200);
|
||||
}
|
||||
if (request->hasArg("chatId")) {
|
||||
jsonWriteStr(configSetupJson, "chatId", request->getParam("chatId")->value());
|
||||
saveConfig();
|
||||
request->send(200);
|
||||
}
|
||||
if (request->hasArg("telegonof")) {
|
||||
bool value = request->getParam("telegonof")->value().toInt();
|
||||
jsonWriteBool(configSetupJson, "telegonof", value);
|
||||
//telegramInit();
|
||||
saveConfig();
|
||||
request->send(200);
|
||||
}
|
||||
if (request->hasArg("teleginput")) {
|
||||
bool value = request->getParam("teleginput")->value().toInt();
|
||||
jsonWriteBool(configSetupJson, "teleginput", value);
|
||||
saveConfig();
|
||||
request->send(200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user