feat: 增加用户信息接口

This commit is contained in:
2026-09-05 16:27:14 +08:00
parent abacbe7a5d
commit 9d694e2a44
6 changed files with 61 additions and 5 deletions

View File

@@ -53,6 +53,16 @@ def get_latest_article(db: Session):
)
article = result.scalar_one_or_none()
if article is None:
return [
{
"title": "",
"content": "",
"summary": "",
"category": ""
}
]
return article.content
@@ -99,6 +109,15 @@ def get_latest_recipe(db: Session):
)
recipe = result.scalar_one_or_none()
if recipe is None:
return [
{
"name": "",
"tags": [],
"content": ""
}
]
return recipe.content