From 1016effe39a3e8d4bbb2678f244d6b248b6aa5bc Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Wed, 10 Feb 2021 09:58:21 -0500 Subject: [PATCH] Fix typo --- app/api/shortcuts.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/app/api/shortcuts.py b/app/api/shortcuts.py index 27b2fe85..6f750673 100644 --- a/app/api/shortcuts.py +++ b/app/api/shortcuts.py @@ -9,8 +9,10 @@ @blueprint.get("/images/") -@doc.summary("Redirect to a example image") -@doc.response(302, doc.File(), description="Successfully redirected to a example image") +@doc.summary("Redirect to an example image") +@doc.response( + 302, doc.File(), description="Successfully redirected to an example image" +) @doc.response(404, str, description="Template not found") @doc.response(501, str, description="Template not fully implemented") async def example(request, template_id): @@ -38,9 +40,11 @@ async def example(request, template_id): @blueprint.get("/.png") -@doc.summary("Redirect to a example image") +@doc.summary("Redirect to an example image") @doc.exclude(settings.DEPLOYED) -@doc.response(302, doc.File(), description="Successfully redirected to a example image") +@doc.response( + 302, doc.File(), description="Successfully redirected to an example image" +) @doc.response(404, str, description="Template not found") async def example_png(request, template_id): template = models.Template.objects.get_or_none(template_id) @@ -51,9 +55,11 @@ async def example_png(request, template_id): @blueprint.get("/.jpg") -@doc.summary("Redirect to a example image") +@doc.summary("Redirect to an example image") @doc.exclude(settings.DEPLOYED) -@doc.response(302, doc.File(), description="Successfully redirected to a example image") +@doc.response( + 302, doc.File(), description="Successfully redirected to an example image" +) @doc.response(404, str, description="Template not found") async def example_jpg(request, template_id): template = models.Template.objects.get_or_none(template_id) @@ -64,9 +70,11 @@ async def example_jpg(request, template_id): @blueprint.get("/") -@doc.summary("Redirect to a example image") +@doc.summary("Redirect to an example image") @doc.exclude(settings.DEPLOYED) -@doc.response(302, doc.File(), description="Successfully redirected to a example image") +@doc.response( + 302, doc.File(), description="Successfully redirected to an example image" +) async def example_legacy(request, template_id): return response.redirect(f"/images/{template_id}")