Backend: Don't abort import / index options API requests

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-14 19:45:01 +02:00
parent 86c8723f79
commit 871c5aae9c
2 changed files with 2 additions and 4 deletions

View file

@ -29,8 +29,7 @@ func GetImportOptions(router *gin.RouterGroup, conf *config.Config) {
dirs, err := fs.Dirs(conf.ImportPath(), true)
if err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": txt.UcFirst(err.Error())})
return
log.Errorf("import: %s", err)
}
c.JSON(http.StatusOK, gin.H{"dirs": dirs})

View file

@ -27,8 +27,7 @@ func GetIndexingOptions(router *gin.RouterGroup, conf *config.Config) {
dirs, err := fs.Dirs(conf.OriginalsPath(), true)
if err != nil {
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"error": txt.UcFirst(err.Error())})
return
log.Errorf("index: %s", err)
}
c.JSON(http.StatusOK, gin.H{"dirs": dirs})