From ee4484fff44a21db3148ddb142aeb76f9d11fe62 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Fri, 26 Dec 2025 17:25:45 +0100 Subject: [PATCH] fix: secubox api.js - Remove expect auto-extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed RPC declare to return full object instead of extracting modules array. The expect: { modules: [] } was auto-extracting the modules property, causing data to be the array directly instead of { modules: [...] }. This caused: - data.modules to be undefined - Module count to show 0 - Empty module lists in UI Now returns the full response object as expected by the views. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- luci-app-secubox/htdocs/luci-static/resources/secubox/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luci-app-secubox/htdocs/luci-static/resources/secubox/api.js b/luci-app-secubox/htdocs/luci-static/resources/secubox/api.js index ab301715..3a5cc6a9 100644 --- a/luci-app-secubox/htdocs/luci-static/resources/secubox/api.js +++ b/luci-app-secubox/htdocs/luci-static/resources/secubox/api.js @@ -17,14 +17,14 @@ var callStatus = rpc.declare({ var callModules = rpc.declare({ object: 'luci.secubox', method: 'modules', - expect: { modules: [] } + expect: {} }); var callModulesByCategory = rpc.declare({ object: 'luci.secubox', method: 'modules_by_category', params: ['category'], - expect: { modules: [] } + expect: {} }); var callModuleInfo = rpc.declare({