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()