From 25e3ef4b460a393c22a43fce7a661c6035c4da88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Fri, 13 May 2022 02:37:29 +0400 Subject: [PATCH] Improve artiste and parole schema --- src/api/artiste/content-types/artiste/schema.json | 9 +++++---- src/api/parole/content-types/parole/schema.json | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/api/artiste/content-types/artiste/schema.json b/src/api/artiste/content-types/artiste/schema.json index 4bb7cf9..2fb195b 100644 --- a/src/api/artiste/content-types/artiste/schema.json +++ b/src/api/artiste/content-types/artiste/schema.json @@ -36,7 +36,7 @@ "target": "api::parole.parole", "inversedBy": "artistes" }, - "admin_user": { + "userAdmin": { "type": "relation", "relation": "oneToOne", "target": "admin::user" @@ -47,11 +47,12 @@ "target": "plugin::users-permissions.user" }, "foto": { + "type": "media", + "multiple": false, + "required": false, "allowedTypes": [ "images" - ], - "type": "media", - "multiple": false + ] } } } diff --git a/src/api/parole/content-types/parole/schema.json b/src/api/parole/content-types/parole/schema.json index f7227ca..4005d4b 100644 --- a/src/api/parole/content-types/parole/schema.json +++ b/src/api/parole/content-types/parole/schema.json @@ -24,7 +24,8 @@ "type": "integer" }, "slug": { - "type": "string" + "type": "string", + "unique": true }, "okiMizikID": { "type": "integer" @@ -41,10 +42,10 @@ "artistes": { "type": "relation", "relation": "manyToMany", - "target": "api::parole.parole", + "target": "api::artiste.artiste", "mappedBy": "paroles" }, - "admin_user": { + "userAdmin": { "type": "relation", "relation": "oneToOne", "target": "admin::user"