File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/webui/www/private/scripts Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -162,21 +162,19 @@ window.qBittorrent.PropPeers ??= (() => {
162
162
} ) ;
163
163
}
164
164
} ,
165
- shadowbanPeer : function ( element , ref ) {
165
+ shadowbanPeer : ( element , ref ) => {
166
166
const selectedPeers = torrentPeersTable . selectedRowsIds ( ) ;
167
167
if ( selectedPeers . length === 0 )
168
168
return ;
169
169
170
170
if ( confirm ( "QBT_TR(Are you sure you want to shadowban the selected peers?)QBT_TR[CONTEXT=PeerListWidget]" ) ) {
171
- new Request ( {
172
- url : "api/v2/transfer/shadowbanPeers" ,
173
- noCache : true ,
174
- method : "post" ,
175
- data : {
171
+ fetch ( "api/v2/transfer/shadowbanPeers" , {
172
+ method : "POST" ,
173
+ body : new URLSearchParams ( {
176
174
hash : torrentsTable . getCurrentTorrentID ( ) ,
177
175
peers : selectedPeers . join ( "|" )
178
- }
179
- } ) . send ( ) ;
176
+ } )
177
+ } ) ;
180
178
}
181
179
}
182
180
} ,
You can’t perform that action at this time.
0 commit comments