mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-08 14:43:21 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "framework/ConfigurationValidator.h"
|
||||
#include "framework/ow_constants.h"
|
||||
#include "framework/utils.h"
|
||||
|
||||
#include "RESTAPI_device_helper.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
@@ -130,11 +132,11 @@ namespace OpenWifi {
|
||||
|
||||
for(auto &i:Device.Notes) {
|
||||
i.createdBy = UserInfo_.userinfo.email;
|
||||
i.created = OpenWifi::Now();
|
||||
i.created = Utils::Now();
|
||||
}
|
||||
|
||||
Config::Config NewConfig(Device.Configuration);
|
||||
Device.UUID = OpenWifi::Now();
|
||||
Device.UUID = Utils::Now();
|
||||
NewConfig.SetUUID(Device.UUID);
|
||||
Device.Configuration = NewConfig.get();
|
||||
|
||||
@@ -173,7 +175,7 @@ namespace OpenWifi {
|
||||
return BadRequest(RESTAPI::Errors::ConfigBlockInvalid);
|
||||
}
|
||||
Config::Config NewConfig(NewDevice.Configuration);
|
||||
uint64_t NewConfigUUID = OpenWifi::Now();
|
||||
uint64_t NewConfigUUID = Utils::Now();
|
||||
NewConfig.SetUUID(NewConfigUUID);
|
||||
Existing.Configuration = NewConfig.get();
|
||||
Existing.UUID = NewConfigUUID;
|
||||
@@ -187,11 +189,11 @@ namespace OpenWifi {
|
||||
|
||||
for(auto &i:NewDevice.Notes) {
|
||||
i.createdBy = UserInfo_.userinfo.email;
|
||||
i.created = OpenWifi::Now();
|
||||
i.created = Utils::Now();
|
||||
Existing.Notes.push_back(i);
|
||||
}
|
||||
|
||||
Existing.LastConfigurationChange = OpenWifi::Now();
|
||||
Existing.LastConfigurationChange = Utils::Now();
|
||||
if (StorageService()->UpdateDevice(Existing)) {
|
||||
SetCurrentConfigurationID(SerialNumber, Existing.UUID);
|
||||
Poco::JSON::Object DevObj;
|
||||
|
||||
Reference in New Issue
Block a user