Skip to content

[Feat] Response post path name instead of id in search API#366

Open
CornWorld wants to merge 1 commit intoMereithhh:masterfrom
CornWorld:feat-api
Open

[Feat] Response post path name instead of id in search API#366
CornWorld wants to merge 1 commit intoMereithhh:masterfrom
CornWorld:feat-api

Conversation

@CornWorld
Copy link
Copy Markdown
Contributor

#356
这是一个未经测试的修改,因为我本地没有部署 Vanblog 的开发环境。
这是我的修改依据:

  1. 依据 API 监听路径 找到此问题与 articleProvider.toSearchResultarticleProvider.searchByString 有关
  2. 阅读后发现,articleProvider.searchByString 中的查询结果应该会返回完整的文章对象(articleModel),其中包含 pathname 字段
  3. 而在 articleProvider.toSearchResult 中筛选了返回的字段,故判断可在此函数内加入判断

CornWorld added a commit to CornWorld/vanblog that referenced this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant