(c *context.Context, f form.Avatar)
| 171 | } |
| 172 | |
| 173 | func SettingsAvatarPost(c *context.Context, f form.Avatar) { |
| 174 | if err := UpdateAvatarSetting(c, f, c.User); err != nil { |
| 175 | c.Flash.Error(err.Error()) |
| 176 | } else { |
| 177 | c.Flash.Success(c.Tr("settings.update_avatar_success")) |
| 178 | } |
| 179 | |
| 180 | c.RedirectSubpath("/user/settings/avatar") |
| 181 | } |
| 182 | |
| 183 | func SettingsDeleteAvatar(c *context.Context) { |
| 184 | err := database.Handle.Users().DeleteCustomAvatar(c.Req.Context(), c.User.ID) |
nothing calls this directly
no test coverage detected