feat: image full URI in avatar
This commit is contained in:
@ -170,8 +170,10 @@ func (h *UserHandler) uploadAvatar(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
imgURI := fmt.Sprintf("%s/api/v1/avatar/%s", h.cfg.Uri, uploadInfo.Key)
|
||||
|
||||
if err := h.repo.UpdateProfilePicture(r.Context(), repository.UpdateProfilePictureParams{
|
||||
ProfilePicture: &uploadInfo.Key,
|
||||
ProfilePicture: &imgURI,
|
||||
ID: user.ID,
|
||||
}); err != nil {
|
||||
web.Error(w, "failed to update profile picture", http.StatusInternalServerError)
|
||||
|
Reference in New Issue
Block a user