luci-app-ddns: fix cacert param write for all cases
authorPaul Donald <[email protected]>
Wed, 23 Jul 2025 11:50:07 +0000 (13:50 +0200)
committerPaul Donald <[email protected]>
Wed, 23 Jul 2025 11:50:49 +0000 (13:50 +0200)
follow-up to 929c520def5dd1393f831befac1bf9dee9f9d796

Signed-off-by: Paul Donald <[email protected]>
applications/luci-app-ddns/htdocs/luci-static/resources/view/ddns/overview.js

index c5576392be6096483580cb96e24d8d081601d642..2a11193c74bea802d6efb5c36e02519319fe50fd 100644 (file)
@@ -457,8 +457,7 @@ return view.extend({
                o.description = _('CA certificate bundle file that will be used to download services data. Set IGNORE to skip certificate validation.');
                o.placeholder = 'IGNORE';
                o.write = function(section_id, value) {
-                       if(value == 'ignore')
-                               uci.set('ddns', section_id, 'cacert', value.toUpperCase());
+                       uci.set('ddns', section_id, 'cacert', value == 'ignore' ? value.toUpperCase() : value);
                };
 
                o = s.taboption('global', form.Value, 'services_url', _('Services URL Download'));
@@ -810,8 +809,7 @@ return view.extend({
                                                o.rmempty = false;
                                                o.optional = true;
                                                o.write = function(section_id, value) {
-                                                       if(value == 'ignore')
-                                                               uci.set('ddns', section_id, 'cacert', value.toUpperCase());
+                                                       uci.set('ddns', section_id, 'cacert', value == 'ignore' ? value.toUpperCase() : value);
                                                };
                                        };