def rebuild_product_dashboard(slug):
"""Rebuild the LTD Dasher dashboard manually for a single product.
Note that the dashboard is built asynchronously.
**Authorization**
User must be authenticated and have ``admin_product`` permissions.
:statuscode 202: Dashboard rebuild trigger sent.
**See also**
- :http:post:`/dashboards`
"""
product = Product.query.filter_by(slug=slug).first_or_404()
build_dashboards([product.get_url()],
current_app.config['LTD_DASHER_URL'],
current_app.logger)
return jsonify({}), 202, {}
评论列表
文章目录