API: Add return to preview error handler

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-20 22:21:59 +02:00
parent ce5d124af8
commit c7e46c44d9

View file

@ -86,6 +86,7 @@ func GetPreview(router *gin.RouterGroup, conf *config.Config) {
if err != nil {
log.Error(err)
c.Data(http.StatusNotFound, "image/svg+xml", photoIconSvg)
return
}
preview = imaging.Paste(preview, src, image.Pt(x, y))