You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: followers.go
    path of file: ./repos/owncast/controllers/admin
    
    the code of the file until where you have to start completion: package admin

import (
	"encoding/json"
	"net/http"

	"github.com/owncast/owncast/activitypub/persistence"
	"github.com/owncast/owncast/activitypub/requests"
	"github.com/owncast/owncast/controllers"
	"github.com/owncast/owncast/core/data"
)

// ApproveFollower will approve a federated follow request.
func ApproveFollower(w http.ResponseWriter, r *http.Request) {
	if !requirePOST(w, r) {
		return
	}

	type approveFollowerRequest struct {
		ActorIRI string `json:"actorIRI"`
		Approved bool   `json:"approved"`
	}

	decoder := json.NewDecoder(r.Body)
	var approval approveFollowerRequest
	if err := decoder.Decode(&approval); err != nil {
		controllers.WriteSimpleResponse(w, false, "unable to handle follower state with provided values")
		return
	}

	if approval.Approved {
		// Approve a follower
    
func ApproveFollower(w http.ResponseWriter, r *http.Request) {
	if !requirePOST(w, r) {
		return
	}

	type approveFollowerRequest struct {
		ActorIRI string `json:"actorIRI"`
		Approved bool   `json:"approved"`
	}

	decoder := json.NewDecoder(r.Body)
	var approval approveFollowerRequest
	if err := decoder.Decode(&approval); err != nil {
		controllers.WriteSimpleResponse(w, false, "unable to handle follower state with provided values")
		return
	}

	if approval.Approved {
		// Approve a follower
		if err := persistence.ApprovePreviousFollowRequest(approval.ActorIRI); err != nil {
			controllers.WriteSimpleResponse(w, false, err.Error())
			return
		}

		localAccountName := data.GetDefaultFederationUsername()

		followRequest, err := persistence.GetFollower(approval.ActorIRI)
		if err != nil {
			controllers.WriteSimpleResponse(w, false, err.Error())
			return
		}

		// Send the approval to the follow requestor.
		if err := requests.SendFollowAccept(followRequest.Inbox, followRequest.RequestObject, localAccountName); err != nil {
			controllers.WriteSimpleResponse(w, false, err.Error())
			return
		}
	} else {
		// Remove/block a follower
		if err := persistence.BlockOrRejectFollower(approval.ActorIRI); err != nil {
			controllers.WriteSimpleResponse(w, false, err.Error())
			return
		}
	}

	controllers.WriteSimpleResponse(w, true, "follower updated")
}