revork structures for hub

This commit is contained in:
2026-04-25 16:04:53 +02:00
parent 635139aad2
commit df1e969d49
9 changed files with 165 additions and 157 deletions
+4 -4
View File
@@ -84,12 +84,12 @@ func HandleGetUserAvatar(response http.ResponseWriter, request *http.Request) {
return
}
if target.Avatar == "" {
if target.AvatarUrl == "" {
http.Error(response, "no avatar", http.StatusNotFound)
return
}
url, _, err := minio.GetDownloadUrlAndMetadata(ctx, target.Avatar)
url, _, err := minio.GetDownloadUrlAndMetadata(ctx, target.AvatarUrl)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return
@@ -122,12 +122,12 @@ func HandleGetUserProfileBg(response http.ResponseWriter, request *http.Request)
return
}
if target.ProfileBg == "" {
if target.ProfileBgUrl == "" {
http.Error(response, "no profile background", http.StatusNotFound)
return
}
url, _, err := minio.GetDownloadUrlAndMetadata(ctx, target.ProfileBg)
url, _, err := minio.GetDownloadUrlAndMetadata(ctx, target.ProfileBgUrl)
if err != nil {
http.Error(response, "internal server error", http.StatusInternalServerError)
return