summaryrefslogtreecommitdiff
path: root/internal/api/activitypub/users/followers.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/activitypub/users/followers.go')
-rw-r--r--internal/api/activitypub/users/followers.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/activitypub/users/followers.go b/internal/api/activitypub/users/followers.go
index f00b7bc40..4815df944 100644
--- a/internal/api/activitypub/users/followers.go
+++ b/internal/api/activitypub/users/followers.go
@@ -31,8 +31,8 @@ import (
// FollowersGETHandler returns a collection of URIs for followers of the target user, formatted so that other AP servers can understand it.
func (m *Module) FollowersGETHandler(c *gin.Context) {
// usernames on our instance are always lowercase
- requestedUsername := strings.ToLower(c.Param(UsernameKey))
- if requestedUsername == "" {
+ requestedUser := strings.ToLower(c.Param(apiutil.UsernameKey))
+ if requestedUser == "" {
err := errors.New("no username specified in request")
apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1)
return
@@ -47,7 +47,7 @@ func (m *Module) FollowersGETHandler(c *gin.Context) {
if contentType == string(apiutil.TextHTML) {
// This isn't an ActivityPub request;
// redirect to the user's profile.
- c.Redirect(http.StatusSeeOther, "/@"+requestedUsername)
+ c.Redirect(http.StatusSeeOther, "/@"+requestedUser)
return
}
@@ -61,7 +61,7 @@ func (m *Module) FollowersGETHandler(c *gin.Context) {
return
}
- resp, errWithCode := m.processor.Fedi().FollowersGet(c.Request.Context(), requestedUsername, page)
+ resp, errWithCode := m.processor.Fedi().FollowersGet(c.Request.Context(), requestedUser, page)
if errWithCode != nil {
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return