# HG changeset patch # User Kim Alvefur # Date 1625336547 -7200 # Node ID 5d494dba9c0226e3f2d41856698bca4e655816f2 # Parent 6478442d217fdc4460c131273e35913e5301a896 mod_auto156: Include the containing object in command output diff -r 6478442d217f -r 5d494dba9c02 mod_auto156/mod_auto156.lua --- a/mod_auto156/mod_auto156.lua Sat Jul 03 20:18:21 2021 +0200 +++ b/mod_auto156/mod_auto156.lua Sat Jul 03 20:22:27 2021 +0200 @@ -29,7 +29,7 @@ if #uris == 0 then return promise.reject(404); end - return uris; + return {links=uris}; end); end @@ -37,8 +37,8 @@ module:provides("http", { route = { ["GET /*"] = function(_, domain) - return check_domain(domain):next(function(uris) - return {headers = {content_type = "application/json"}, body = json.encode({links = uris})}; + return check_domain(domain):next(function(altmethods) + return {headers = {content_type = "application/json"}, body = json.encode(altmethods)}; end); end, },