numerique-gouv / impress

MIT License
11 stars 6 forks source link

✨Endpoint to create a doc from a string. #265

Open AntoLC opened 1 month ago

AntoLC commented 1 month ago

Feature Request

We want to interconnect Meet with Docs, Meet has a string and want to create a doc with it. Problem, to fit the system the content has to be a Y.Doc with a json formatted in a way to be readable by the frontend editor.

Possible solution

Adapt POST /api/v1.0/documents/ to convert automatically in the good format depend some param. By example, if create_content is set during the POST we will convert to Y.doc by ourself on the backend side:


Request payload:
{
   create_content: string;
   title: string;
}
AntoLC commented 4 days ago

PR related: https://github.com/numerique-gouv/impress/pull/344