Load the list when setting a background

This commit is contained in:
kolaente 2020-05-29 22:12:16 +02:00
parent 42ddee8d6f
commit aae1bc3cab
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,10 @@ func (bp *BackgroundProvider) SetBackground(c echo.Context) error {
log.Infof("Tried to update list background of list %d while not having the rights for it (User: %v)", listID, auth)
return echo.NewHTTPError(http.StatusForbidden)
}
// Load the list
if err := list.GetSimpleByID(); err != nil {
return handler.HandleHTTPError(err, c)
}
image := &background.Image{}
err = c.Bind(image)