mod_rest: Fix disco#info identities data mapping
authorKim Alvefur <zash@zash.se>
Sat, 25 Jan 2020 00:20:00 +0100
changeset 3854 8d13b9c9ba75
parent 3853 11c34e97fe1a
child 3855 8dbca6a93988
mod_rest: Fix disco#info identities data mapping It should now handle the same format it produces.
mod_rest/jsonmap.lib.lua
--- a/mod_rest/jsonmap.lib.lua	Sat Jan 25 00:19:11 2020 +0100
+++ b/mod_rest/jsonmap.lib.lua	Sat Jan 25 00:20:00 2020 +0100
@@ -61,7 +61,7 @@
 				disco.attr.node = tostring(s.node);
 				if s.identities then
 					for _, identity in ipairs(s.identities) do
-						disco:tag("identity", { category = identity[1], type = identity[2] }):up();
+						disco:tag("identity", { category = identity.category, type = identity.type, name = identity.name }):up();
 					end
 				end
 				if s.features then