aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/index.py9
-rw-r--r--docs/api/roots.py24
2 files changed, 0 insertions, 33 deletions
diff --git a/docs/api/index.py b/docs/api/index.py
deleted file mode 100644
index 28bff7d..0000000
--- a/docs/api/index.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from sanic import Sanic
-from sanic.response import json
-app = Sanic()
-
-
-@app.route('/')
-@app.route('/<path:path>')
-async def index(request, path=""):
- return json({'hello': path})
diff --git a/docs/api/roots.py b/docs/api/roots.py
deleted file mode 100644
index 428c625..0000000
--- a/docs/api/roots.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import json
-import random
-from http.server import BaseHTTPRequestHandler
-from os.path import dirname, abspath, join
-from typing import Any
-
-dir = dirname(abspath(__file__))
-
-class handler(BaseHTTPRequestHandler):
- def do_GET(self):
- self.send_response(200)
- self.send_header('Content-type', 'application/json')
- self.end_headers()
-
- with open(join(dir, '..', 'data', 'roots.txt'), 'r', encoding='utf-8') as file:
- lines = file.readlines()
- random_line = random.choice(lines)
- response = {
- 'line': random_line.strip()
- }
- response_json = json.dumps(response, ensure_ascii=False)
-
- self.wfile.write(response_json.encode('utf-8'))
- return \ No newline at end of file