(id)
| 69 | |
| 70 | @app.route('/<int:id>/delete/', methods=('POST',)) |
| 71 | def delete(id): |
| 72 | products = get_products(id) |
| 73 | conn = get_db_connection() |
| 74 | conn.execute('DELETE FROM products WHERE id = ?', (id,)) |
| 75 | conn.commit() |
| 76 | conn.close() |
| 77 | flash('"{}" was successfully deleted!'.format(products['title'])) |
| 78 | return redirect(url_for('index')) |
| 79 | |
| 80 | |
| 81 | @app.route('/') |
nothing calls this directly
no test coverage detected