Editor to gemtext half way

This commit is contained in:
Senad Uka
2023-09-16 16:59:16 +02:00
parent 1765a150bb
commit 201579ad87
6 changed files with 53 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
package cethttp
import (
"database/sql"
"net/http"
"strconv"
@@ -31,7 +32,7 @@ func editHandler(w http.ResponseWriter, r *http.Request) {
editedTitle := r.FormValue("title")
// Update the post content.
post.Content = editedContent
post.GemtextContent = sql.NullString{String: editedContent, Valid: true}
post.Title = editedTitle
// Save the edited post to the database.