admin/sync: Add last sync date into full_import_report
This commit is contained in:
parent
809d166a2d
commit
935b1666ac
2 changed files with 12 additions and 1 deletions
|
@ -2,8 +2,10 @@ package sync
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
"sync"
|
||||
|
||||
"srs.epita.fr/fic-server/libfic"
|
||||
|
@ -18,6 +20,7 @@ func SyncDeep(i Importer) map[string][]string {
|
|||
|
||||
errs := map[string][]string{}
|
||||
|
||||
errs["_date"] = []string{fmt.Sprintf("%v", time.Now())}
|
||||
errs["_themes"] = SyncThemes(i)
|
||||
|
||||
if themes, err := fic.GetThemes(); err == nil {
|
||||
|
@ -34,6 +37,8 @@ func SyncDeep(i Importer) map[string][]string {
|
|||
}
|
||||
}
|
||||
|
||||
errs["_date"] = append(errs["_date"], fmt.Sprintf("%v", time.Now()))
|
||||
|
||||
if fdto, err := os.Create("../htdocs-admin/full_import_report.json"); err == nil {
|
||||
defer fdto.Close()
|
||||
|
||||
|
|
Reference in a new issue