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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

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)