remove debugging /streams endpoint

This commit is contained in:
Jack Robison 2019-04-18 17:30:54 -04:00
parent e2663f6d57
commit 8107e97304
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -273,7 +273,6 @@ class Daemon(metaclass=JSONRPCServerType):
app = web.Application()
app.router.add_get('/lbryapi', self.handle_old_jsonrpc)
app.router.add_post('/lbryapi', self.handle_old_jsonrpc)
app.router.add_get('/streams', self.handle_streams_index)
app.router.add_get('/get/{claim_name}', self.handle_stream_get_request)
app.router.add_get('/get/{claim_name}/{claim_id}', self.handle_stream_get_request)
app.router.add_get('/stream/{sd_hash}', self.handle_stream_range_request)
@ -457,15 +456,6 @@ class Daemon(metaclass=JSONRPCServerType):
content_type='application/json'
)
async def handle_streams_index(self, request: web.Request):
return web.Response(
body="<ul>" + "".join([
f'<li><a href="/stream/{sd_hash}">lbry://{stream.claim_name}</a></li>'
for sd_hash, stream in self.stream_manager.streams.items()
]) + "</ul>",
content_type='text/html'
)
async def handle_stream_get_request(self, request: web.Request):
name_and_claim_id = request.path.split("/get/")[1]
if "/" not in name_and_claim_id: