diff options
Diffstat (limited to 'internal/api/activitypub/users/following.go')
| -rw-r--r-- | internal/api/activitypub/users/following.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/activitypub/users/following.go b/internal/api/activitypub/users/following.go index 630e0b821..ccc5ce641 100644 --- a/internal/api/activitypub/users/following.go +++ b/internal/api/activitypub/users/following.go @@ -31,8 +31,8 @@ import ( // FollowingGETHandler returns a collection of URIs for accounts that the target user follows, formatted so that other AP servers can understand it. func (m *Module) FollowingGETHandler(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) FollowingGETHandler(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) FollowingGETHandler(c *gin.Context) { return } - resp, errWithCode := m.processor.Fedi().FollowingGet(c.Request.Context(), requestedUsername, page) + resp, errWithCode := m.processor.Fedi().FollowingGet(c.Request.Context(), requestedUser, page) if errWithCode != nil { apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return |
