bug修复

This commit is contained in:
ALEX 2024-05-12 05:37:12 +00:00
parent 6373f15695
commit a248c84e2e

View File

@ -156,8 +156,8 @@ var port string
func apirequest_info_get(w http.ResponseWriter, req *http.Request) {
var fileid = req.PathValue("request")
file, err := os.ReadFile("./api" + fileid + ".json")
fmt.Printf("requesting %s\n", "./api"+fileid+".json")
file, err := os.ReadFile("./api/" + fileid + ".json")
fmt.Printf("requesting %s\n", "./api/"+fileid+".json")
if err != nil {
w.WriteHeader(403)
fmt.Printf("Requesting file %s does not exist\n", "./api"+fileid+".json")