From 07853ab4f58f08cb68ec5ae8aeeb0eded0b43914 Mon Sep 17 00:00:00 2001 From: iiPython Date: Thu, 12 Jan 2023 11:05:14 -0600 Subject: [PATCH] Implement /dogwithabanana --- src/routes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes.py b/src/routes.py index cdd1c98..bafcb56 100644 --- a/src/routes.py +++ b/src/routes.py @@ -31,6 +31,14 @@ def validate_key(key: str) -> bool: async def status(req) -> web.Response: return web.Response(text = "OK", status = 200) +@routes.get("/dogwithabanana") +@routes.post("/dogwithabanana") +async def dogwithabanana(req) -> web.Response: + if req.method == "POST": + return web.Response(text = "https://www.youtube.com/watch?v=21HNPnjjcZE", status = 200) + + raise web.HTTPTemporaryRedirect("https://www.youtube.com/watch?v=21HNPnjjcZE") + @routes.post("/init") async def init_server(req) -> web.Response: try: