Fix response keys in server API handlers
Corrected the response to include 'article_url' and fixed a typo in 'related_organizations' mapping. These updates ensure accurate and complete API responses.
This commit is contained in:
parent
db19c4f4f8
commit
5ba682c6f9
1 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,8 @@ async def smd_detail_article(article_id):
|
|||
logger.info(f"smd_article_summarization {summarized_content}")
|
||||
return {
|
||||
"message": summarized_content,
|
||||
"article_id": article_id
|
||||
"article_id": article_id,
|
||||
"article_url": data.get("online"),
|
||||
}
|
||||
else:
|
||||
return {
|
||||
|
@ -152,7 +153,7 @@ async def smd_research(search_query: str = "Bundesrat", date_from: str = "2024-0
|
|||
logger.info(f"detailed_articles {detailed_articles}")
|
||||
return {
|
||||
"related_persons": facets.get("persons", []),
|
||||
"related_organizations": facets.get("persons", []),
|
||||
"related_organizations": facets.get("organization", []),
|
||||
"detailed_articles": detailed_articles
|
||||
}
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue