diff options
author | 2024-07-08 15:47:03 +0200 | |
---|---|---|
committer | 2024-07-08 15:47:03 +0200 | |
commit | d70f4e166dd9ce2f11a6ac2d7a2e500515657041 (patch) | |
tree | 256f2a4423742a41adceb00dbec0cd56c568e908 /internal/web/profile.go | |
parent | [chore]: Bump github.com/minio/minio-go/v7 from 7.0.72 to 7.0.73 (#3083) (diff) | |
download | gotosocial-d70f4e166dd9ce2f11a6ac2d7a2e500515657041.tar.xz |
[feature/frontend] Allow setting alt-text for avatar + header (#3086)
Diffstat (limited to 'internal/web/profile.go')
-rw-r--r-- | internal/web/profile.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/internal/web/profile.go b/internal/web/profile.go index 1dbf5c73d..ca613900f 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -28,7 +28,6 @@ import ( apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util" "github.com/superseriousbusiness/gotosocial/internal/gtserror" - "github.com/superseriousbusiness/gotosocial/internal/oauth" ) func (m *Module) profileGETHandler(c *gin.Context) { @@ -79,16 +78,8 @@ func (m *Module) profileGETHandler(c *gin.Context) { // text/html has been requested. Proceed with getting the web view of the account. - // Don't require auth for web endpoints, but do take it if it was provided. - // authed.Account might end up nil here, but that's fine in case of public pages. - authed, err := oauth.Authed(c, false, false, false, false) - if err != nil { - apiutil.WebErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGetV1) - return - } - // Fetch the target account so we can do some checks on it. - targetAccount, errWithCode := m.processor.Account().GetLocalByUsername(ctx, authed.Account, targetUsername) + targetAccount, errWithCode := m.processor.Account().GetWeb(ctx, targetUsername) if errWithCode != nil { apiutil.WebErrorHandler(c, errWithCode, instanceGet) return |