fix(secubox-p2p): Fix discoverPeers API method name

Changed P2PAPI.discoverPeers() to P2PAPI.discover() to match the
actual method exposed by the API module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-02-13 08:32:16 +01:00
parent aa13009f54
commit e52fdfc299

View File

@ -246,7 +246,7 @@ return view.extend({
scanPeers: function() { scanPeers: function() {
var self = this; var self = this;
ui.showModal(_('Scanning...'), E('p', { 'class': 'spinning' }, _('Discovering peers...'))); ui.showModal(_('Scanning...'), E('p', { 'class': 'spinning' }, _('Discovering peers...')));
P2PAPI.discoverPeers().then(function(result) { P2PAPI.discover().then(function(result) {
ui.hideModal(); ui.hideModal();
var count = (result && result.length) || 0; var count = (result && result.length) || 0;
ui.addNotification(null, E('p', {}, 'Found ' + count + ' peer(s)'), 'info'); ui.addNotification(null, E('p', {}, 'Found ' + count + ' peer(s)'), 'info');