admin: Also fill lastSyncError in autosync
This commit is contained in:
parent
376e112130
commit
c74eadc801
@ -284,10 +284,12 @@ func autoSync(c *gin.Context) {
|
|||||||
|
|
||||||
if !IsProductionEnv {
|
if !IsProductionEnv {
|
||||||
if err := sync.GlobalImporter.Sync(); err != nil {
|
if err := sync.GlobalImporter.Sync(); err != nil {
|
||||||
|
lastSyncError = err.Error()
|
||||||
log.Println("Unable to sync.GI.Sync:", err.Error())
|
log.Println("Unable to sync.GI.Sync:", err.Error())
|
||||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Unable to perform the pull."})
|
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Unable to perform the pull."})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
lastSyncError = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
themes, err := fic.GetThemes()
|
themes, err := fic.GetThemes()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user