Make content fields required in post and content models (#7972)

#### What type of PR is this?

/area core
/kind improvement
/milestone 2.22.x

#### What this PR does / why we need it:

See #7967 

#### Which issue(s) this PR fixes:

Fixes #7967 

#### Does this PR introduce a user-facing change?

```release-note
None
```
This commit is contained in:
Ryan Wang
2025-12-01 10:39:37 +08:00
committed by GitHub
parent 9d85275d0f
commit 488f9cc7c4
12 changed files with 65 additions and 38 deletions

View File

@@ -78,17 +78,8 @@ const handleChangeEditorProvider = async (provider: EditorProvider) => {
}
};
// fixme: PostRequest type may be wrong
interface PostRequestWithContent extends PostRequest {
content: {
raw: string;
content: string;
rawType: string;
};
}
// Post form
const formState = ref<PostRequestWithContent>({
const formState = ref<PostRequest>({
post: {
spec: {
title: "",