feat(api): Add source link to recipe description
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2a2d0c682f
commit
219dd5deee
3
app.py
3
app.py
@ -252,7 +252,8 @@ def add_recipe():
|
|||||||
response_data = {"message": "Recipe already exists"}
|
response_data = {"message": "Recipe already exists"}
|
||||||
return jsonify(response_data), 400
|
return jsonify(response_data), 400
|
||||||
xcf_recipe = get_recipe_from_xiachufang(url)
|
xcf_recipe = get_recipe_from_xiachufang(url)
|
||||||
description = ""
|
description = "<a href=\"" + url + "\">" + '来源' + "</a>"
|
||||||
|
description += "<br>"
|
||||||
if xcf_recipe['ingredients']:
|
if xcf_recipe['ingredients']:
|
||||||
description += "<h2>用料</h2>\n"
|
description += "<h2>用料</h2>\n"
|
||||||
description += "<ul>\n"
|
description += "<ul>\n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user