Diff

mod_admin_web/admin_web/mod_admin_web.lua @ 6263:10a1016d1c3a

Merge update
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Sun, 01 Jun 2025 11:43:16 +0700
parent 6222:963c16e417d6
line wrap: on
line diff
--- a/mod_admin_web/admin_web/mod_admin_web.lua	Sun Jun 01 11:41:42 2025 +0700
+++ b/mod_admin_web/admin_web/mod_admin_web.lua	Sun Jun 01 11:43:16 2025 +0700
@@ -123,14 +123,8 @@
 	module:depends("admin_adhoc");
 	module:depends("http");
 
-	local serve;
-	if not pcall(function ()
-		local http_files = require "net.http.files";
-		serve = http_files.serve;
-	end) then
-		serve = module:depends"http_files".serve;
-	end
-	local serve_file = serve {
+	local http_files = require "net.http.files";
+	local serve_file = http_files.serve {
 		path = module:get_directory() .. "/www_files";
 	};