admin: Add a route and a button to sync the filesystem

This commit is contained in:
nemunaire 2021-11-13 11:06:24 +01:00
commit 038abe450d
4 changed files with 27 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"path"
"reflect"
"srs.epita.fr/fic-server/admin/sync"
"srs.epita.fr/fic-server/libfic"
@ -32,7 +33,8 @@ func getROSettings(_ httprouter.Params, body []byte) (interface{}, error) {
}
return map[string]interface{}{
"sync": syncMtd,
"sync-type": reflect.TypeOf(sync.GlobalImporter).Name(),
"sync": syncMtd,
}, nil
}