Skip to content

Commit d2a5bf4

Browse files
author
Olivier Bonnaure
committed
fix: disable pcall for controllers
1 parent 580caef commit d2a5bf4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.lua/luaonbeans.lua

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,17 @@ function HandleRequest()
279279
end
280280
end
281281
else
282-
if BeansEnv == "production" then
283-
local status, controller = pcall(require, Params.controller .. "_controller")
284-
if status == false then
285-
handle_404_error()
286-
else
287-
controller[Params.action]()
288-
end
289-
else
290-
RoutePath("/app/controllers/" .. Params.controller .. "_controller.lua")
291-
end
282+
-- if BeansEnv == "production" then
283+
-- local status, controller = pcall(require, Params.controller .. "_controller")
284+
-- if status == false then
285+
-- handle_404_error()
286+
-- else
287+
-- controller[Params.action]()
288+
-- end
289+
-- else
290+
-- RoutePath("/app/controllers/" .. Params.controller .. "_controller.lua")
291+
-- end
292+
RoutePath("/app/controllers/" .. Params.controller .. "_controller.lua")
292293
end
293294
end
294295

0 commit comments

Comments
 (0)