diff --git a/core/api.py b/core/api.py index 039c7858..d46548f5 100644 --- a/core/api.py +++ b/core/api.py @@ -3,7 +3,6 @@ from typing import Annotated, Literal from annotated_types import Ge, Le, MinLen from django.conf import settings from django.db.models import F -from django.http import HttpResponse from ninja import File, Query from ninja.security import SessionAuth from ninja_extra import ControllerBase, api_controller, paginate, route @@ -18,7 +17,6 @@ from core.models import Group, QuickUploadImage, SithFile, User from core.schemas import ( FamilyGodfatherSchema, GroupSchema, - MarkdownSchema, SithFileSchema, UploadedFileSchema, UploadedImage, @@ -28,18 +26,9 @@ from core.schemas import ( UserSchema, ValidationErrorSchema, ) -from core.templatetags.renderer import markdown from counter.utils import is_logged_in_counter -@api_controller("/markdown") -class MarkdownController(ControllerBase): - @route.post("", url_name="markdown") - def render_markdown(self, body: MarkdownSchema): - """Convert the markdown text into html.""" - return HttpResponse(markdown(body.text), content_type="text/html") - - @api_controller("/upload") class UploadController(ControllerBase): @route.post( diff --git a/core/schemas.py b/core/schemas.py index 7f159363..f6dc4f5b 100644 --- a/core/schemas.py +++ b/core/schemas.py @@ -161,10 +161,6 @@ class UserFilterSchema(FilterSchema): return value -class MarkdownSchema(Schema): - text: str - - class FamilyGodfatherSchema(Schema): godfather: int godchild: int