revork structures for hub
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user