diff options
author | knotteye <knotteye@airmail.cc> | 2021-07-01 17:56:04 -0500 |
---|---|---|
committer | knotteye <knotteye@airmail.cc> | 2021-07-01 17:56:04 -0500 |
commit | 4e3848cadbb3fd89b94a7ef24838173939d198db (patch) | |
tree | 06ea5434986b2b9c00e392a7d44b93d7eae23668 /main.go | |
parent | 638a03b458b71564b1db439e6386d7dbf2a5181c (diff) |
Add a list of local boards and server news
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -598,6 +598,17 @@ func main() { MakeActivityRequestOutbox(db, newActorActivity) http.Redirect(w, r, "/" + *Key, http.StatusSeeOther) }) + + http.HandleFunc("/" + *Key + "/postnews", func(w http.ResponseWriter, r *http.Request) { + var newsitem NewsItem + + newsitem.Title = r.FormValue("title") + newsitem.Content = r.FormValue("summary") + + WriteNewsToDB(db, newsitem) + + http.Redirect(w, r, "/", http.StatusSeeOther) + }) http.HandleFunc("/verify", func(w http.ResponseWriter, r *http.Request){ if(r.Method == "POST") { |