mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
Fix bug with saving general settings not using tempSettingsStruct and using store values instead (#1131)
residual from #1075 closes #1129
This commit is contained in:
@@ -68,8 +68,22 @@ const settingsHaveChanged = (): boolean => {
|
||||
const saveGeneralSettings = () => {
|
||||
const changingStaticIp = useSettingsStore().network.connectionType === NetworkConnectionType.Static;
|
||||
|
||||
// replace undefined members with empty strings for backend
|
||||
const payload = {
|
||||
connectionType: tempSettingsStruct.value.connectionType,
|
||||
hostname: tempSettingsStruct.value.hostname,
|
||||
networkManagerIface: tempSettingsStruct.value.networkManagerIface || "",
|
||||
ntServerAddress: tempSettingsStruct.value.ntServerAddress,
|
||||
runNTServer: tempSettingsStruct.value.runNTServer,
|
||||
setDHCPcommand: tempSettingsStruct.value.setDHCPcommand || "",
|
||||
setStaticCommand: tempSettingsStruct.value.setStaticCommand || "",
|
||||
shouldManage: tempSettingsStruct.value.shouldManage,
|
||||
shouldPublishProto: tempSettingsStruct.value.shouldPublishProto,
|
||||
staticIp: tempSettingsStruct.value.staticIp
|
||||
};
|
||||
|
||||
useSettingsStore()
|
||||
.saveGeneralSettings()
|
||||
.updateGeneralSettings(payload)
|
||||
.then((response) => {
|
||||
useStateStore().showSnackbarMessage({
|
||||
message: response.data.text || response.data,
|
||||
|
||||
Reference in New Issue
Block a user