mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现HTTP服务架构
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "common/JsonN.h"
|
||||
#include "Logger.h"
|
||||
#include "AppData.h"
|
||||
|
||||
AppOption Config::option;
|
||||
|
||||
@@ -34,5 +35,11 @@ bool Config::init(std::string filename)
|
||||
XLOGI() << "[APP] load database config error: not found. host=" << option.database.host;
|
||||
}
|
||||
|
||||
if (jsonroot.contains("token"))
|
||||
{
|
||||
std::string token = jsonroot["token"];
|
||||
option.useToken = !token.empty();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user