Mercurial > prosody-modules
changeset 4614:5d494dba9c02
mod_auto156: Include the containing object in command output
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Jul 2021 20:22:27 +0200 |
parents | 6478442d217f |
children | 451514e2d369 |
files | mod_auto156/mod_auto156.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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, },