fix: secubox api.js - Remove expect auto-extraction

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 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2025-12-26 17:25:45 +01:00
parent 34f980312f
commit ee4484fff4

View File

@ -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({