fix: add missing slug and description fields to Article schema and fix auth header
This commit is contained in:
parent
8eaaf4afad
commit
ac610e6f6a
@ -106,9 +106,13 @@ export class StrapiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getHeaders() {
|
private getHeaders() {
|
||||||
return {
|
// Only include Authorization header if token is set
|
||||||
Authorization: `Bearer ${this.strapiApiToken}`,
|
if (this.strapiApiToken) {
|
||||||
};
|
return {
|
||||||
|
Authorization: `Bearer ${this.strapiApiToken}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
private async findOrCreateCategory(
|
private async findOrCreateCategory(
|
||||||
|
|||||||
@ -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"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user