Diff

mod_rest/mod_rest.lua @ 4480:dad0367d33e8

mod_rest: Revert leftover of unfinished ?query mapping Idea was to allow second level data fields to be passed as query parameters, i.e. /rest/command/{to}/?command=execute&node=foobar but that's still a work in progress, so reverted here for now.
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2021 20:59:53 +0100
parent 4478:7ab0c423688a
child 4481:e453eaf1589e
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua	Sun Feb 28 20:47:32 2021 +0100
+++ b/mod_rest/mod_rest.lua	Sun Feb 28 20:59:53 2021 +0100
@@ -65,11 +65,9 @@
 	if not st_kind then return; end
 	if st_kind == "iq" and st_type ~= "get" and st_type ~= "set" then
 		-- GET /iq/disco/jid
-		data = {
-			kind = "iq";
-			type = "get";
-			[st_type] = data;
-		}
+		data.kind = "iq";
+		data.type = "get";
+		data.[st_type] = true;
 	else
 		data.kind = st_kind;
 		data.type = st_type;