mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Update reconfigurable device to prevent writing secrets to local file
This commit is contained in:
@@ -20,11 +20,16 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
public DeviceConfig Config { get; private set; }
|
public DeviceConfig Config { get; private set; }
|
||||||
|
|
||||||
protected ReconfigurableDevice(DeviceConfig config)
|
protected ReconfigurableDevice(DeviceConfig config)
|
||||||
: base(config.Key)
|
: this(config.Key)
|
||||||
{
|
{
|
||||||
SetNameHelper(config);
|
}
|
||||||
|
|
||||||
Config = config;
|
protected ReconfigurableDevice(string key) : base(key)
|
||||||
|
{
|
||||||
|
//getting config directly from ConfigReader to avoid the possiblitiy of writing secrets to file
|
||||||
|
Config = ConfigReader.ConfigObject.GetDeviceForKey(key);
|
||||||
|
|
||||||
|
SetNameHelper(Config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user