summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-commands/ucode/template
diff options
context:
space:
mode:
authorDaniel Nilsson <dannil+github@protonmail.com>2024-09-18 21:37:16 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-09-18 23:24:03 +0200
commit72255eb46c9425fbcb3ab4e000032f6b2a0cef2d (patch)
tree3f15932f8c940e33514aad5bec8bf204788fefc1 /applications/luci-app-commands/ucode/template
parent5a30e6c3af7f6bb1b4f02b5fcf8134c2b00ad3fb (diff)
luci-app-commands: correctly pass custom arguments as query string
Commit 702c007 changed the request to be invoked via the Request.get function instead of the deprecated XHR one. The request options object requires the query string to be located inside of the subobject "query", otherwise they are not picked up. This resulted in breaking the custom arguments functionality as the input would simply be ignored. Fixes #7255 Signed-off-by: Daniel Nilsson <dannil+github@protonmail.com>
Diffstat (limited to 'applications/luci-app-commands/ucode/template')
-rw-r--r--applications/luci-app-commands/ucode/template/commands.ut3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-app-commands/ucode/template/commands.ut b/applications/luci-app-commands/ucode/template/commands.ut
index 90a3c298f0..18e3a9dfda 100644
--- a/applications/luci-app-commands/ucode/template/commands.ut
+++ b/applications/luci-app-commands/ucode/template/commands.ut
@@ -45,7 +45,8 @@
legend.parentNode.style.display = 'block';
legend.style.display = 'inline';
- L.Request.get(L.url('admin/system/commands/run', id), field ? { args: field.value } : null).then(function(reply) {
+ var options = field ? { query: { args: field.value } } : null;
+ L.Request.get(L.url('admin/system/commands/run', id), options).then(function(reply) {
var st = reply.json();
if (st.binary)