Added 200 Ok response when clearing cache

This commit is contained in:
Seednode 2023-01-18 19:14:39 -06:00
parent 42734cda62
commit 979a9e4d4c
2 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
var Version = "0.30.1" var Version = "0.30.2"
func init() { func init() {
rootCmd.AddCommand(versionCmd) rootCmd.AddCommand(versionCmd)

View File

@ -345,6 +345,10 @@ func serveCacheClearHandler(args []string, fileCache *[]string) http.HandlerFunc
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
} }
w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "text/plain")
w.Write([]byte("Ok"))
} }
} }
} }