feat(api): Add source link to recipe description
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ching 2024-03-04 14:17:43 +08:00
parent 2a2d0c682f
commit 219dd5deee

3
app.py
View File

@ -252,7 +252,8 @@ def add_recipe():
response_data = {"message": "Recipe already exists"}
return jsonify(response_data), 400
xcf_recipe = get_recipe_from_xiachufang(url)
description = ""
description = "<a href=\"" + url + "\">" + '来源' + "</a>"
description += "<br>"
if xcf_recipe['ingredients']:
description += "<h2>用料</h2>\n"
description += "<ul>\n"