mess about with media a bit more

This commit is contained in:
tsmethurst
2021-03-29 17:03:25 +02:00
parent 6ed16ace85
commit 39aca2025f
14 changed files with 953 additions and 79 deletions

View File

@ -177,7 +177,7 @@ func (m *accountModule) accountUpdateCredentialsPATCHHandler(c *gin.Context) {
c.JSON(http.StatusBadRequest, gin.H{"error": fmt.Sprintf("could not read provided header: %s", err)})
return
}
headerInfo, err := m.mediaHandler.SetHeaderForAccountID(f, authed.Account.ID)
headerInfo, err := m.mediaHandler.SetHeaderOrAvatarForAccountID(f, authed.Account.ID, "header")
if err != nil {
l.Debugf("error processing header: %s", err)
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})