Skip to content

Commit

Permalink
wip: fix types on shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Feb 15, 2022
1 parent 531d03d commit 6645c3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/shortcuts.py
Expand Up @@ -13,8 +13,8 @@
@openapi.response(
302, {"image/*": bytes}, "Successfully redirected to an example image"
)
@openapi.response(404, str, "Template not found")
@openapi.response(501, str, "Template not fully implemented")
@openapi.response(404, {"text/html": str}, "Template not found")
@openapi.response(501, {"text/html": str}, "Template not fully implemented")
async def example_path(request, template_id):
template_id = utils.urls.clean(template_id)

Expand Down Expand Up @@ -48,7 +48,7 @@ async def example_path(request, template_id):
@openapi.response(
302, {"image/*": bytes}, "Successfully redirected to an example image"
)
@openapi.response(404, str, "Template not found")
@openapi.response(404, {"text/html": str}, "Template not found")
async def legacy_example_image(request, template_id):
template_id, extension = template_id.rsplit(".", 1)
template = models.Template.objects.get_or_none(template_id)
Expand Down Expand Up @@ -106,7 +106,7 @@ async def custom_path(request, template_id, text_paths):
@openapi.parameter("text_paths", str, "path")
@openapi.parameter("template_id", str, "path")
@openapi.response(302, {"image/*": bytes}, "Successfully redirected to a custom image")
@openapi.response(404, str, description="Template not found")
@openapi.response(404, {"text/html": str}, description="Template not found")
async def legacy_custom_image(request, template_id, text_paths):
text_paths, extension = text_paths.rsplit(".", 1)
template = models.Template.objects.get_or_none(template_id)
Expand Down

0 comments on commit 6645c3a

Please sign in to comment.