♻️(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:
@@ -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"]}
|
||||
|
||||
Reference in New Issue
Block a user