♻️(backend) rename convert_markdown to convert (#1114)

Renamed the `convert_markdown` method to `convert` to prepare for an
all-purpose conversion endpoint, enabling support for multiple formats
and simplifying future extension.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
This commit is contained in:
Stephan Meijer
2025-07-04 15:30:32 +02:00
committed by GitHub
parent e148c237f1
commit 58bf5071c2
4 changed files with 20 additions and 22 deletions

View File

@@ -408,9 +408,7 @@ class ServerCreateDocumentSerializer(serializers.Serializer):
language = user.language or language
try:
document_content = YdocConverter().convert_markdown(
validated_data["content"]
)
document_content = YdocConverter().convert(validated_data["content"])
except ConversionError as err:
raise serializers.ValidationError(
{"content": ["Could not convert content"]}