# HG changeset patch # User Kim Alvefur # Date 1644324701 -3600 # Node ID dc7c9ae15f436d93d27bb1673a5d1ddf6f87d3c3 # Parent 806f7c8d830b890e2e8ae7b9b1233d409fe7e00a mod_rest: Ensure mod_http is loaded before API demo Fixes an error as it tried to use module:http_url() which doesn't exist before mod_http is loaded diff -r 806f7c8d830b -r dc7c9ae15f43 mod_rest/mod_rest.lua --- a/mod_rest/mod_rest.lua Mon Feb 07 16:52:19 2022 +0100 +++ b/mod_rest/mod_rest.lua Tue Feb 08 13:51:41 2022 +0100 @@ -384,13 +384,14 @@ end end +module:depends("http"); + local demo_handlers = {}; if module:get_option_path("rest_demo_resources", nil) then demo_handlers = module:require"apidemo"; end -- Handle stanzas submitted via HTTP -module:depends("http"); module:provides("http", { route = { POST = handle_request;