Change /clear_cache endpoint to /rebuild_index

This commit is contained in:
Seednode 2023-09-28 10:35:01 -05:00
parent 3c9f5095f9
commit 09ccf91a39
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ func (index *fileIndex) Import(path string) error {
return nil
}
func serveIndexClear(args []string, index *fileIndex, formats *types.Types, errorChannel chan<- error) httprouter.Handle {
func serveIndexRebuild(args []string, index *fileIndex, formats *types.Types, errorChannel chan<- error) httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
index.clear()
@ -176,7 +176,7 @@ func serveIndexClear(args []string, index *fileIndex, formats *types.Types, erro
}
func registerIndexHandlers(mux *httprouter.Router, args []string, index *fileIndex, formats *types.Types, errorChannel chan<- error) error {
registerHandler(mux, Prefix+"/clear_index", serveIndexClear(args, index, formats, errorChannel))
registerHandler(mux, Prefix+"/rebuild_index", serveIndexRebuild(args, index, formats, errorChannel))
return nil
}

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "2.0.0"
ReleaseVersion string = "2.0.1"
)
var (