From 71a17f4252229b9a3635b8a4f6a7db861c349fed Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Thu, 29 Jun 2023 21:20:12 +0200 Subject: [PATCH] add info on / --- lemmyprivacycheck/__main__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lemmyprivacycheck/__main__.py b/lemmyprivacycheck/__main__.py index 441391a..01e6bc2 100644 --- a/lemmyprivacycheck/__main__.py +++ b/lemmyprivacycheck/__main__.py @@ -1,6 +1,8 @@ import fastapi from PIL import Image, ImageDraw, ImageFont from io import BytesIO + +from fastapi.responses import PlainTextResponse app = fastapi.FastAPI() img = Image.open("./smoking-caterpillar.jpg") @@ -9,6 +11,10 @@ font = ImageFont.truetype("./unicode.impact.ttf", 72) class JPEGResponse(fastapi.Response): media_type="image/jpeg" +@app.get("/", response_class=PlainTextResponse) +async def root(): + return "go to /image for the funny thingy" + @app.get("/img", response_class=JPEGResponse) async def getImage(request: fastapi.Request): img2 = img.copy()