fix(agent-office): bookmark field name + service_proxy contract + mktemp
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,13 +112,15 @@ async def realestate_collect() -> Dict[str, Any]:
|
||||
|
||||
|
||||
async def realestate_matches(limit: int = 20) -> List[Dict[str, Any]]:
|
||||
resp = await _client.get(
|
||||
f"{REALESTATE_LAB_URL}/api/realestate/matches",
|
||||
params={"limit": limit, "unread_only": True},
|
||||
)
|
||||
resp.raise_for_status()
|
||||
data = resp.json()
|
||||
return data if isinstance(data, list) else data.get("matches", [])
|
||||
"""realestate-lab의 GET /api/realestate/matches 호출."""
|
||||
async with httpx.AsyncClient(timeout=10) as client:
|
||||
resp = await client.get(
|
||||
f"{REALESTATE_LAB_URL}/api/realestate/matches",
|
||||
params={"size": limit},
|
||||
)
|
||||
resp.raise_for_status()
|
||||
data = resp.json()
|
||||
return data.get("items", [])
|
||||
|
||||
|
||||
async def realestate_dashboard() -> Dict[str, Any]:
|
||||
|
||||
@@ -84,10 +84,10 @@ async def _handle_realestate_bookmark(callback_query: dict, callback_id: str) ->
|
||||
|
||||
try:
|
||||
result = await service_proxy.realestate_bookmark_toggle(ann_id)
|
||||
bookmarked = result.get("bookmarked", None)
|
||||
if bookmarked is True:
|
||||
is_on = result.get("is_bookmarked")
|
||||
if is_on == 1:
|
||||
await send_raw(f"🔖 북마크 추가 완료 (#{ann_id})")
|
||||
elif bookmarked is False:
|
||||
elif is_on == 0:
|
||||
await send_raw(f"🔖 북마크 해제 완료 (#{ann_id})")
|
||||
else:
|
||||
await send_raw(f"🔖 북마크 토글 완료 (#{ann_id})")
|
||||
|
||||
Reference in New Issue
Block a user