Browse Source

Small cleanup

pull/1678/head
Gabe Kangas 4 years ago
parent
commit
24a57f9076
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
  1. 2
      activitypub/activitypub.go
  2. 2
      activitypub/controllers/followers.go

2
activitypub/activitypub.go

@ -19,7 +19,7 @@ func Start(datastore *data.Datastore) { @@ -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))

2
activitypub/controllers/followers.go

@ -25,7 +25,7 @@ const ( @@ -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
}

Loading…
Cancel
Save