Software /
code /
prosody-modules
Diff
mod_rest/mod_rest.lua @ 4888:dc7c9ae15f43
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 08 Feb 2022 13:51:41 +0100 |
parent | 4841:f69c5a443156 |
child | 4917:9d0ec61c70a1 |
line wrap: on
line diff
--- 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;