Add friendly name to recipe detail endpoint
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -401,6 +401,15 @@ async def get_recipe(
|
|||||||
if not recipe:
|
if not recipe:
|
||||||
raise HTTPException(404, "Recipe not found")
|
raise HTTPException(404, "Recipe not found")
|
||||||
|
|
||||||
|
# Add friendly name if available
|
||||||
|
from ..services.naming_service import get_naming_service
|
||||||
|
naming = get_naming_service()
|
||||||
|
friendly = await naming.get_by_cid(ctx.actor_id, recipe_id)
|
||||||
|
if friendly:
|
||||||
|
recipe["friendly_name"] = friendly["friendly_name"]
|
||||||
|
recipe["base_name"] = friendly["base_name"]
|
||||||
|
recipe["version_id"] = friendly["version_id"]
|
||||||
|
|
||||||
if wants_json(request):
|
if wants_json(request):
|
||||||
return recipe
|
return recipe
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user