Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

refactor: change api of fetching post and singlepage content #828

Merged
merged 5 commits into from
Jan 31, 2023

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Jan 17, 2023

What type of PR is this?

/kind improvement

What this PR does / why we need it:

修改获取文章和自定义页面内容的 API,用于适配:halo-dev/halo#3168

Special notes for your reviewer:

测试方式:

  1. 测试文章和自定义页面编辑时,能否正常获取内容即可。

Does this PR introduce a user-facing change?

None

@vercel
Copy link

vercel bot commented Jan 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
ui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 30, 2023 at 7:19AM (UTC)

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note-none Denotes a PR that doesn't merit a release note. labels Jan 17, 2023
@JohnNiang
Copy link
Member

image

image

当没有 head content 的时候会出现以下错误,且无法再次编辑。

@ruibaby
Copy link
Member Author

ruibaby commented Jan 19, 2023

当没有 head content 的时候会出现以下错误,且无法再次编辑。

@guqing 会存在没有 head snapshot 的情况吗?

@guqing
Copy link
Member

guqing commented Jan 19, 2023

当没有 head content 的时候会出现以下错误,且无法再次编辑。

@guqing 会存在没有 head snapshot 的情况吗?

应该不会,head 会在创建文章时填充为base 如果出现为空的情况就是需要优化

1 similar comment
@guqing
Copy link
Member

guqing commented Jan 19, 2023

当没有 head content 的时候会出现以下错误,且无法再次编辑。

@guqing 会存在没有 head snapshot 的情况吗?

应该不会,head 会在创建文章时填充为base 如果出现为空的情况就是需要优化

@JohnNiang
Copy link
Member

应该不会,head 会在创建文章时填充为base 如果出现为空的情况就是需要优化

在我切换至当前 PR 的时候,就已经有了“About Me”的自定义页面了。切换后,无法直接编辑了。

@guqing
Copy link
Member

guqing commented Jan 30, 2023

应该不会,head 会在创建文章时填充为base 如果出现为空的情况就是需要优化

在我切换至当前 PR 的时候,就已经有了“About Me”的自定义页面了。切换后,无法直接编辑了。

@ruibaby 自定义页面获取内容调用 API 错误,应该是自定义页面的而不是文章的
image

正确为:
/apis/api.console.halo.run/v1alpha1/singlepages/{singlePageName}/head-content

顺便检查自定义页面的 /singlepages/{name}/release-content API 是否调用错为文章的

@ruibaby
Copy link
Member Author

ruibaby commented Jan 30, 2023

自定义页面获取内容调用 API 错误,应该是自定义页面的而不是文章的

已修复。

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2023
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2023
@ruibaby
Copy link
Member Author

ruibaby commented Jan 31, 2023

ping @halo-dev/sig-halo-console

@guqing
Copy link
Member

guqing commented Jan 31, 2023

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jan 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 6c7b48b into halo-dev:main Jan 31, 2023
@ruibaby ruibaby added this to the 2.2.0 milestone Jan 31, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…v/console#828)

#### What type of PR is this?

/kind improvement

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

修改获取文章和自定义页面内容的 API,用于适配:halo-dev#3168

#### Special notes for your reviewer:

测试方式:

1. 测试文章和自定义页面编辑时,能否正常获取内容即可。

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

```release-note
None
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants