feat(config): enhance NodeConfig with TrafficReportThreshold, IPStrategy, DNS, Block, and Outbound fields

This commit is contained in:
Chang lue Tsen
2025-09-28 19:05:54 +09:00
parent 64f0bcc55a
commit 0d1df5f905
14 changed files with 395 additions and 115 deletions
@@ -41,7 +41,9 @@ func (l *UpdateNodeConfigLogic) UpdateNodeConfig(req *types.NodeConfig) error {
// Get the field name
fieldName := t.Field(i).Name
// Get the field value to string
fieldValue := tool.ConvertValueToString(v.Field(i))
var fieldValue string
fieldValue = tool.ConvertValueToString(v.Field(i))
// Update the server config
err = db.Model(&system.System{}).Where("`category` = 'server' and `key` = ?", fieldName).Update("value", fieldValue).Error
if err != nil {