mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	fix rutorrent lint
This commit is contained in:
		
							parent
							
								
									b5bb9c0272
								
							
						
					
					
						commit
						c57d980558
					
				@ -11,9 +11,14 @@ export default async function rutorrentProxyHandler(req, res) {
 | 
			
		||||
    if (widget) {
 | 
			
		||||
      const constructedUrl = new URL(widget.url);
 | 
			
		||||
 | 
			
		||||
      let rtPort = constructedUrl.port;
 | 
			
		||||
      if (rtPort === '') {
 | 
			
		||||
        rtPort = constructedUrl.protocol === "https:" ? 443 : 80;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      const rutorrent = new RuTorrent({
 | 
			
		||||
        host: constructedUrl.hostname,
 | 
			
		||||
        port: constructedUrl.port !== '' ? constructedUrl.port : (constructedUrl.protocol === "https:" ? 443 : 80),
 | 
			
		||||
        port: rtPort,
 | 
			
		||||
        path: constructedUrl.pathname,
 | 
			
		||||
        ssl: constructedUrl.protocol === "https:",
 | 
			
		||||
        username: widget.username,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user