From 120e162b36ba069d9871f5a1916a1fbb42165d28 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 13 Aug 2022 13:39:26 +0200 Subject: [PATCH] Contents only have one folder now --- src/api/content/content-types/content/schema.json | 6 +++--- .../content-types/contents-folder/schema.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/content/content-types/content/schema.json b/src/api/content/content-types/content/schema.json index 73cd7fe..8d073db 100644 --- a/src/api/content/content-types/content/schema.json +++ b/src/api/content/content-types/content/schema.json @@ -53,11 +53,11 @@ "target": "api::chronicle.chronicle", "mappedBy": "contents" }, - "folders": { + "folder": { "type": "relation", - "relation": "manyToMany", + "relation": "manyToOne", "target": "api::contents-folder.contents-folder", - "mappedBy": "contents" + "inversedBy": "contents" } } } diff --git a/src/api/contents-folder/content-types/contents-folder/schema.json b/src/api/contents-folder/content-types/contents-folder/schema.json index eb813ea..0aa5e99 100644 --- a/src/api/contents-folder/content-types/contents-folder/schema.json +++ b/src/api/contents-folder/content-types/contents-folder/schema.json @@ -38,9 +38,9 @@ }, "contents": { "type": "relation", - "relation": "manyToMany", + "relation": "oneToMany", "target": "api::content.content", - "inversedBy": "folders" + "mappedBy": "folder" }, "sequence": { "type": "boolean",