Skip to content

Commit

Permalink
Alinea content update
Browse files Browse the repository at this point in the history
update
Co-authored-by: Brecht Cloetens <brecht@codeurs.be>
  • Loading branch information
alinea-cloud[bot] authored and cloetensbrecht committed Jun 18, 2024
1 parent d65bdb5 commit 0698483
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/web/content/pages/docs/content/editing-content.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"_type": "Doc",
"_index": "a1G",
"_i18nId": "2bwoBrTOuERj2E8r7yuNglC0H6G",
"_root": "pages",
"title": "Editing content",
"navigationTitle": "",
"body": [
Expand Down Expand Up @@ -87,14 +86,14 @@
"content": [
{
"_type": "text",
"text": "Entry fields can be edited using the `edit` function. Optionally pass the entry Type as a second argument so the field values are typed correctly."
"text": "Entry fields can be edited using the `update` function. Optionally pass the entry Type as a second argument so the field values are typed correctly."
}
]
},
{
"_type": "CodeBlock",
"_id": "2bx3AJ8D93WgmthX8tiEqZura9X",
"code": "import {Edit, Query} from 'alinea'\n\n// Select the first blog post\nconst blogPostId = await cms.get(Query(BlogPost).select(Query.id))\n\n// Edit a field and save\nconst update = Edit(blogPostId, BlogPost).set({\n body: 'New body text'\n})\n\nawait cms.commit(update)",
"code": "import {Edit, Query} from 'alinea'\n\n// Select the first blog post\nconst blogPostId = await cms.get(Query(BlogPost).select(Query.id))\n\n// Edit a field and save\nconst update = Edit.update(blogPostId, BlogPost).set({\n body: 'New body text'\n})\n\nawait cms.commit(update)",
"fileName": "",
"language": ""
},
Expand Down

0 comments on commit 0698483

Please sign in to comment.