Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: correct avatar URL generation to resolve 404 errors (#4839)

Amar Singh Rathourb779dd2e5434
diff --git a/server/router/api/v1/user_service.go b/server/router/api/v1/user_service.go
index a7af29d3a..74cacf67b 100644
--- a/server/router/api/v1/user_service.go
+++ b/server/router/api/v1/user_service.go
@@ -785,7 +785,7 @@ func convertUserFromStore(user *store.User) *v1pb.User {
// Check if avatar url is base64 format.
_, _, err := extractImageInfo(user.AvatarURL)
if err == nil {
- userpb.AvatarUrl = fmt.Sprintf("/file/%s/avatar", userpb.Name)
+ userpb.AvatarUrl = fmt.Sprintf("/api/v1/%s/avatar", userpb.Name)
} else {
userpb.AvatarUrl = user.AvatarURL
}