From ac610e6f6a70bb7bc513edc52c2724f8bf4f6519 Mon Sep 17 00:00:00 2001 From: echo Date: Sat, 28 Feb 2026 16:10:48 +0100 Subject: [PATCH] fix: add missing slug and description fields to Article schema and fix auth header --- backend/src/modules/strapi.service.ts | 10 +++++++--- .../src/api/article/content-types/article/schema.json | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/backend/src/modules/strapi.service.ts b/backend/src/modules/strapi.service.ts index de8ac5b..ee279cb 100644 --- a/backend/src/modules/strapi.service.ts +++ b/backend/src/modules/strapi.service.ts @@ -106,9 +106,13 @@ export class StrapiService { } private getHeaders() { - return { - Authorization: `Bearer ${this.strapiApiToken}`, - }; + // Only include Authorization header if token is set + if (this.strapiApiToken) { + return { + Authorization: `Bearer ${this.strapiApiToken}`, + }; + } + return {}; } private async findOrCreateCategory( diff --git a/cms/cms/src/api/article/content-types/article/schema.json b/cms/cms/src/api/article/content-types/article/schema.json index 38b35b6..d387c37 100644 --- a/cms/cms/src/api/article/content-types/article/schema.json +++ b/cms/cms/src/api/article/content-types/article/schema.json @@ -16,6 +16,14 @@ "type": "string", "required": true }, + "slug": { + "type": "uid", + "targetField": "title", + "required": true + }, + "description": { + "type": "text" + }, "content": { "type": "richtext" },