🏷️(backend) add body type on generate-document endpoint
We were converting from markdown to html, but the frontend can provide the body in html format, so wa can avoid the conversion. Solution: Add body type on generate-document endpoint to allow to choose between markdown and html.
This commit is contained in:
@@ -153,4 +153,10 @@ class TemplateSerializer(BaseResourceSerializer):
|
||||
class DocumentGenerationSerializer(serializers.Serializer):
|
||||
"""Serializer to receive a request to generate a document on a template."""
|
||||
|
||||
body = serializers.CharField(label=_("Markdown Body"))
|
||||
body = serializers.CharField(label=_("Body"))
|
||||
body_type = serializers.ChoiceField(
|
||||
choices=["html", "markdown"],
|
||||
label=_("Body type"),
|
||||
required=False,
|
||||
default="html",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user