admin: Also fill lastSyncError in autosync
This commit is contained in:
parent
376e112130
commit
c74eadc801
1 changed files with 2 additions and 0 deletions
|
@ -284,10 +284,12 @@ func autoSync(c *gin.Context) {
|
|||
|
||||
if !IsProductionEnv {
|
||||
if err := sync.GlobalImporter.Sync(); err != nil {
|
||||
lastSyncError = err.Error()
|
||||
log.Println("Unable to sync.GI.Sync:", err.Error())
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Unable to perform the pull."})
|
||||
return
|
||||
}
|
||||
lastSyncError = ""
|
||||
}
|
||||
|
||||
themes, err := fic.GetThemes()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue