Refactor the storage provider interface.

This commit is contained in:
Yang Luo
2021-08-08 11:37:16 +08:00
parent d16569d461
commit 44150a6781
5 changed files with 105 additions and 103 deletions

View File

@ -256,9 +256,9 @@ func (c *ApiController) UploadAvatar() {
}
dist, _ := base64.StdEncoding.DecodeString(avatarBase64[index+1:])
msg := object.UploadAvatar(provider, user.GetId(), dist)
if msg != "" {
c.ResponseError(msg)
err := object.UploadAvatar(provider, user.GetId(), dist)
if err != nil {
c.ResponseError(err.Error())
return
}