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:
parent
34f980312f
commit
ee4484fff4
@ -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({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user