Mercurial > prosody-modules
comparison mod_admin_web/admin_web/mod_admin_web.lua @ 6190:963c16e417d6
mod_admin_web: Remove compatibility with 0.11
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Wed, 09 Apr 2025 19:04:30 +0200 |
| parents | 2825fa4504f0 |
| children |
comparison
equal
deleted
inserted
replaced
| 6189:f315edc39f3d | 6190:963c16e417d6 |
|---|---|
| 121 -- Dependencies | 121 -- Dependencies |
| 122 module:depends("bosh"); | 122 module:depends("bosh"); |
| 123 module:depends("admin_adhoc"); | 123 module:depends("admin_adhoc"); |
| 124 module:depends("http"); | 124 module:depends("http"); |
| 125 | 125 |
| 126 local serve; | 126 local http_files = require "net.http.files"; |
| 127 if not pcall(function () | 127 local serve_file = http_files.serve { |
| 128 local http_files = require "net.http.files"; | |
| 129 serve = http_files.serve; | |
| 130 end) then | |
| 131 serve = module:depends"http_files".serve; | |
| 132 end | |
| 133 local serve_file = serve { | |
| 134 path = module:get_directory() .. "/www_files"; | 128 path = module:get_directory() .. "/www_files"; |
| 135 }; | 129 }; |
| 136 | 130 |
| 137 -- Setup HTTP server | 131 -- Setup HTTP server |
| 138 module:provides("http", { | 132 module:provides("http", { |
