From 183f1012f41d17851091dd7e11795c9eea5030c8 Mon Sep 17 00:00:00 2001 From: Muhammad Anas Sarfraz Date: Fri, 18 Oct 2024 17:21:15 +0500 Subject: [PATCH] Fix code snippets in "Configuring Collections, Fields, and Relations" guide (#23865) Co-authored-by: Pascal Jufer --- contributors.yml | 1 + docs/extensions/services/configuring-collections.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contributors.yml b/contributors.yml index 82f611ed4f..9b943f46f7 100644 --- a/contributors.yml +++ b/contributors.yml @@ -171,3 +171,4 @@ - mmsardar - ubercj - Julias0 +- anassarfraz diff --git a/docs/extensions/services/configuring-collections.md b/docs/extensions/services/configuring-collections.md index 820a8ab2cc..d0cb8f37b1 100644 --- a/docs/extensions/services/configuring-collections.md +++ b/docs/extensions/services/configuring-collections.md @@ -46,7 +46,7 @@ router.post('/', async (req, res) => { const data = await collectionsService.readOne(collectionKey); - res.json(record); + res.json(data); }); ``` @@ -146,7 +146,7 @@ router.post('/', async (req, res) => { field.field, ); - res.json(createdField); + res.json(data); }); ``` @@ -189,7 +189,7 @@ router.patch('/', async (req, res) => { 'field_name', ); - res.json(updatedField); + res.json(data); }); ``` @@ -251,7 +251,7 @@ router.post('/', async (req, res) => { const data = await relationsService.readOne(data); - res.json(record); + res.json(data); }); ```