diff --git a/package.json b/package.json index ef5d169..14c557e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "harmony-back", - "version": "0.12.1", + "version": "0.12.2", "private": true, "description": "A Strapi application", "scripts": { diff --git a/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 844df48..d50e10b 100644 --- a/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2025-11-12T14:43:35.118Z" + "x-generation-date": "2025-11-12T20:11:53.117Z" }, "x-strapi-config": { "plugins": [ @@ -17853,30 +17853,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -18345,20 +18335,6 @@ } } }, - "UserLanguageComponent": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "language": { - "type": "string" - }, - "level": { - "type": "integer" - } - } - }, "AnnouncementRequest": { "type": "object", "required": [ @@ -21483,30 +21459,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -25426,30 +25392,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -28928,30 +28884,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -32878,30 +32824,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -37079,30 +37015,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -41729,30 +41655,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -45669,30 +45585,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -49511,30 +49417,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -53340,30 +53236,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -57205,30 +57091,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -60962,30 +60838,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -64896,30 +64762,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -68903,30 +68759,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -72399,30 +72245,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -76824,30 +76660,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -80638,30 +80464,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -84773,30 +84589,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -88620,30 +88426,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -92571,30 +92367,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -96423,30 +96209,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -99780,30 +99556,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -104346,30 +104112,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -108241,30 +107997,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" @@ -112096,30 +111842,20 @@ } } }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocialTagsComponent" - } - }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/GroupActivityComponent" } }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserLanguageComponent" - } - }, "bio": { "type": "string" }, "experience": { "type": "integer" }, + "tags": {}, + "languages": {}, "createdAt": { "type": "string", "format": "date-time" diff --git a/src/extensions/users-permissions/content-types/user/schema.json b/src/extensions/users-permissions/content-types/user/schema.json index 2d6e834..06bb915 100644 --- a/src/extensions/users-permissions/content-types/user/schema.json +++ b/src/extensions/users-permissions/content-types/user/schema.json @@ -209,26 +209,22 @@ "target": "api::post-ownership.post-ownership", "mappedBy": "author" }, - "tags": { - "type": "component", - "repeatable": true, - "component": "social.tags" - }, "activities": { "type": "component", "repeatable": true, "component": "group.activity" }, - "languages": { - "type": "component", - "repeatable": true, - "component": "user.language" - }, "bio": { "type": "text" }, "experience": { "type": "integer" + }, + "tags": { + "type": "json" + }, + "languages": { + "type": "json" } } } diff --git a/src/extensions/users-permissions/strapi-server.ts b/src/extensions/users-permissions/strapi-server.ts index 56807cf..6b38d24 100644 --- a/src/extensions/users-permissions/strapi-server.ts +++ b/src/extensions/users-permissions/strapi-server.ts @@ -204,20 +204,25 @@ module.exports = (plugin) => { "phone", "bio", "experience", + "tags", + "languages", ]); + /* if (data.tags) { newData.tags = data.tags.map((tag) => ({ + __component: "social.tags", text: tag.text, })); } if (data.languages) { newData.languages = data.languages.map((lang) => ({ + __component: "user.language", language: lang.language, level: lang.level, })); - } + }*/ if (newData.username) { const userWithSameUsername = await strapi diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts index 1e6872a..58a671a 100644 --- a/types/generated/contentTypes.d.ts +++ b/types/generated/contentTypes.d.ts @@ -1881,7 +1881,7 @@ export interface PluginUsersPermissionsUser job: Schema.Attribute.Enumeration< ['choir_director', 'choir_addict', 'choir_master', 'choir_singer', 'none'] >; - languages: Schema.Attribute.Component<'user.language', true>; + languages: Schema.Attribute.JSON; locale: Schema.Attribute.String & Schema.Attribute.Private; localizations: Schema.Attribute.Relation< 'oneToMany', @@ -1912,7 +1912,7 @@ export interface PluginUsersPermissionsUser >; saved_posts: Schema.Attribute.Relation<'oneToMany', 'api::post.post'>; surname: Schema.Attribute.String; - tags: Schema.Attribute.Component<'social.tags', true>; + tags: Schema.Attribute.JSON; updatedAt: Schema.Attribute.DateTime; updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & Schema.Attribute.Private;