fix: add missing slug and description fields to Article schema and fix auth header

This commit is contained in:
echo 2026-02-28 16:10:48 +01:00
parent 8eaaf4afad
commit ac610e6f6a
2 changed files with 15 additions and 3 deletions

View File

@ -106,10 +106,14 @@ export class StrapiService {
} }
private getHeaders() { private getHeaders() {
// Only include Authorization header if token is set
if (this.strapiApiToken) {
return { return {
Authorization: `Bearer ${this.strapiApiToken}`, Authorization: `Bearer ${this.strapiApiToken}`,
}; };
} }
return {};
}
private async findOrCreateCategory( private async findOrCreateCategory(
categorySlug: string, categorySlug: string,

View File

@ -16,6 +16,14 @@
"type": "string", "type": "string",
"required": true "required": true
}, },
"slug": {
"type": "uid",
"targetField": "title",
"required": true
},
"description": {
"type": "text"
},
"content": { "content": {
"type": "richtext" "type": "richtext"
}, },