From 24a57f907655bd693194eb00534e4723af38245e Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 12 Jan 2022 15:16:24 -0800 Subject: [PATCH] Small cleanup --- activitypub/activitypub.go | 2 +- activitypub/controllers/followers.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activitypub/activitypub.go b/activitypub/activitypub.go index 0d80a5afee..ac41e2a902 100644 --- a/activitypub/activitypub.go +++ b/activitypub/activitypub.go @@ -19,7 +19,7 @@ func Start(datastore *data.Datastore) { inbox.InitInboxWorkerPool() StartRouter() - // Test + // Generate the keys for signing federated activity if needed. if data.GetPrivateKey() == "" { privateKey, publicKey, err := crypto.GenerateKeys() _ = data.SetPrivateKey(string(privateKey)) diff --git a/activitypub/controllers/followers.go b/activitypub/controllers/followers.go index 22e60c6dc3..11193f51a4 100644 --- a/activitypub/controllers/followers.go +++ b/activitypub/controllers/followers.go @@ -25,7 +25,7 @@ const ( // FollowersHandler will return the list of remote followers on the Fediverse. func FollowersHandler(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" { + if r.Method != http.MethodGet { w.WriteHeader(http.StatusMethodNotAllowed) return }