Diff

mod_rest/jsonmap.lib.lua @ 3850:8d13b9c9ba75

mod_rest: Fix disco#info identities data mapping It should now handle the same format it produces.
author Kim Alvefur <zash@zash.se>
date Sat, 25 Jan 2020 00:20:00 +0100
parent 3849:11c34e97fe1a
child 3851:8dbca6a93988
line wrap: on
line diff
--- 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