mirror of
https://github.com/Gabi-Zar/Pico-2W-Computer-Power-Controller.git
synced 2026-08-03 07:46:22 +02:00
Remove useless crypto-js GET route
This commit is contained in:
13
main.py
13
main.py
@@ -193,19 +193,6 @@ async def serve_client(reader, writer):
|
||||
|
||||
message = ""
|
||||
|
||||
if method == "GET" and path == "/crypto-js.min.js":
|
||||
with open("crypto-js.min.js", "rb") as f:
|
||||
js = f.read()
|
||||
|
||||
writer.write(
|
||||
"HTTP/1.0 200 OK\r\n"
|
||||
"Content-Type: application/javascript\r\n"
|
||||
"Content-Length: %d\r\n\r\n" % len(js)
|
||||
)
|
||||
writer.write(js)
|
||||
await writer.drain()
|
||||
return
|
||||
|
||||
if method == "POST" and path == "/computer" and content_length > 0:
|
||||
body = await reader.read(content_length)
|
||||
params = parse_form(body.decode())
|
||||
|
||||
Reference in New Issue
Block a user