bittorrent-relay
Advanced tools
Comparing version 4.0.2 to 4.0.3
11
index.js
@@ -242,4 +242,7 @@ import Debug from 'debug' | ||
} | ||
} else if(req.method === 'GET' && req.url === '/i'){ | ||
} else if(req.method === 'GET' && req.url === '/h'){ | ||
res.setHeader('Content-Type', 'application/json') | ||
res.end(JSON.stringify(self.hashes)) | ||
} else if(req.method === 'GET' && req.url === '/l'){ | ||
res.setHeader('Content-Type', 'application/json') | ||
res.end(JSON.stringify(self.sendTo)) | ||
@@ -249,3 +252,7 @@ } else if(req.method === 'GET' && req.url.startsWith('/i/')){ | ||
res.setHeader('Content-Type', 'application/json') | ||
res.end(self.sendTo[test] ? JSON.stringify(self.sendTo[test]) : JSON.stringify([])) | ||
// res.end(self.sendTo[test] ? JSON.stringify(self.sendTo[test]) : JSON.stringify([])) | ||
res.end(JSON.stringify(self.sendTo[test])) | ||
} if(req.method === 'GET' && req.url === '/zed'){ | ||
res.setHeader('Content-Type', 'application/json') | ||
res.end(JSON.stringify('thanks for using bittorrent-relay')) | ||
} else { | ||
@@ -252,0 +259,0 @@ res.setHeader('Content-Type', 'application/json') |
{ | ||
"name": "bittorrent-relay", | ||
"description": "Uses the mainline dht to relay requests to other trackers in a swarm", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"bin": { | ||
@@ -6,0 +6,0 @@ "bittorrent-relay": "./bin/cmd.js" |
48117
1262