critical edit page update

This commit is contained in:
cube
2026-05-09 19:35:42 +01:00
parent 85c9f31592
commit f2dd764219
2 changed files with 2 additions and 2 deletions

View File

@@ -909,7 +909,7 @@ def edit_page(pid):
content = request.form["content"]
title = request.form["title"]
db.execute("UPDATE pages SET content=(?), title=(?)",(content, title))
db.execute("UPDATE pages SET content=(?), title=(?) WHERE id=(?)",(content, title, pid))
db.commit()
page = db.execute("SELECT * FROM pages WHERE id=(?)",(pid,)).fetchone()

View File

@@ -33,7 +33,7 @@
<hr>
{% for page in pages %}
<p>{{page[1]}} - <a href="{{ url_for('manage.edit_page', pid=page[0]) }}">Edit Page</a> &#9734 <a href="{{ url_for('manage.delete_page', pid=page[0]) }}">Delete Page</a></p>
<p><a href="{{ url_for('home.custom_page', pid=page[0]) }}">{{page[1]}}</a> - <a href="{{ url_for('manage.edit_page', pid=page[0]) }}">Edit Page</a> &#9734 <a href="{{ url_for('manage.delete_page', pid=page[0]) }}">Delete Page</a></p>
{% endfor %}