admin: Add a route and a button to sync the filesystem
This commit is contained in:
parent
a06602a7e8
commit
038abe450d
4 changed files with 27 additions and 6 deletions
|
@ -56,6 +56,11 @@ func init() {
|
|||
return map[string]interface{}{"progress": sync.DeepSyncProgress}, nil
|
||||
}
|
||||
}))
|
||||
router.POST("/api/sync/base", apiHandler(
|
||||
func(_ httprouter.Params, _ []byte) (interface{}, error) {
|
||||
err := sync.GlobalImporter.Sync()
|
||||
return true, err
|
||||
}))
|
||||
router.POST("/api/sync/speed", apiHandler(
|
||||
func(_ httprouter.Params, _ []byte) (interface{}, error) {
|
||||
st := sync.SpeedySyncDeep(sync.GlobalImporter)
|
||||
|
|
Reference in a new issue