diff options
-rw-r--r-- | activityPubStruct.go | 6 | ||||
-rw-r--r-- | client.go | 4 | ||||
-rw-r--r-- | follow.go | 2 | ||||
-rw-r--r-- | main.go | 19 |
4 files changed, 7 insertions, 24 deletions
diff --git a/activityPubStruct.go b/activityPubStruct.go index 2c57c61..8676b12 100644 --- a/activityPubStruct.go +++ b/activityPubStruct.go @@ -99,11 +99,11 @@ type Activity struct { Name string `json:"name,omitempty"` Summary string `json:"summary,omitempty"` Auth string `json:"auth,omitempty"` - To []string `json:"to, omitempty"` + To []string `json:"to,omitempty"` Bto []string `json:"bto,omitempty"` - Cc []string `json:"cc, omitempty"` + Cc []string `json:"cc,omitempty"` Published time.Time `json:"published,omitempty"` - Object *ObjectBase `json:"object, omitempty"` + Object *ObjectBase `json:"object,omitempty"` } type ObjectBase struct { @@ -70,7 +70,7 @@ type AdminPage struct { IsLocal bool PostBlacklist []PostBlacklist AutoSubscribe bool - Themes *[]string + Themes *[]string } type Report struct { @@ -535,7 +535,7 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { err := t.ExecuteTemplate(w, "layout", returnData) if err != nil { // TODO: actual error handler - log.Printf("PostGet: %s\n") + log.Printf("PostGet: %s\n", err) } } @@ -214,8 +214,6 @@ func SetActorFollowerDB(db *sql.DB, activity Activity) Activity { activity.Type = "Accept" return activity } - - return activity } func SetActorFollowingDB(db *sql.DB, activity Activity) Activity { @@ -13,6 +13,7 @@ import ( "html/template" "io" "io/ioutil" + "log" "math/rand" "mime/multipart" "net/http" @@ -24,7 +25,6 @@ import ( "strconv" "strings" "time" - "log" ) var Port = ":" + GetConfigValue("instanceport", "3000") @@ -631,7 +631,7 @@ func main() { adminData.AutoSubscribe = GetActorAutoSubscribeDB(db, actor.Id) - adminData.Themes = &Themes; + adminData.Themes = &Themes err := t.ExecuteTemplate(w, "layout", adminData) if err != nil { @@ -993,9 +993,6 @@ func main() { http.Redirect(w, r, "/"+board, http.StatusSeeOther) return } - - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("")) }) http.HandleFunc("/deleteattach", func(w http.ResponseWriter, r *http.Request) { @@ -1067,9 +1064,6 @@ func main() { http.Redirect(w, r, OP, http.StatusSeeOther) return } - - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("")) }) http.HandleFunc("/marksensitive", func(w http.ResponseWriter, r *http.Request) { @@ -1124,9 +1118,6 @@ func main() { http.Redirect(w, r, OP, http.StatusSeeOther) return } - - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("")) }) http.HandleFunc("/remove", func(w http.ResponseWriter, r *http.Request) { @@ -1181,9 +1172,6 @@ func main() { http.Redirect(w, r, "/"+board, http.StatusSeeOther) return } - - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("")) }) http.HandleFunc("/removeattach", func(w http.ResponseWriter, r *http.Request) { @@ -1228,9 +1216,6 @@ func main() { http.Redirect(w, r, OP, http.StatusSeeOther) return } - - w.WriteHeader(http.StatusBadRequest) - w.Write([]byte("")) }) http.HandleFunc("/report", func(w http.ResponseWriter, r *http.Request) { |