luci: fix bug

This commit is contained in:
xiaorouji 2023-10-16 20:31:47 +08:00 committed by sbwml
parent 9a8ae2aeae
commit e195f359a4

View File

@ -247,7 +247,7 @@ o.cfgvalue = function(self, section)
return m:get(section, "v2ray_dns_mode")
end
o.write = function(self, section, value)
if dns_mode:formvalue(section) == "xray" then
if s.fields["dns_mode"]:formvalue(section) == "xray" then
return m:set(section, "v2ray_dns_mode", value)
end
end
@ -260,7 +260,7 @@ o.cfgvalue = function(self, section)
return m:get(section, "v2ray_dns_mode")
end
o.write = function(self, section, value)
if dns_mode:formvalue(section) == "sing-box" then
if s.fields["dns_mode"]:formvalue(section) == "sing-box" then
return m:set(section, "v2ray_dns_mode", value)
end
end