Compare commits
2 Commits
6373f15695
...
0ddf6e4c63
Author | SHA1 | Date | |
---|---|---|---|
0ddf6e4c63 | |||
a248c84e2e |
|
@ -156,8 +156,8 @@ var port string
|
||||||
|
|
||||||
func apirequest_info_get(w http.ResponseWriter, req *http.Request) {
|
func apirequest_info_get(w http.ResponseWriter, req *http.Request) {
|
||||||
var fileid = req.PathValue("request")
|
var fileid = req.PathValue("request")
|
||||||
file, err := os.ReadFile("./api" + fileid + ".json")
|
file, err := os.ReadFile("./api/" + fileid + ".json")
|
||||||
fmt.Printf("requesting %s\n", "./api"+fileid+".json")
|
fmt.Printf("requesting %s\n", "./api/"+fileid+".json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.WriteHeader(403)
|
w.WriteHeader(403)
|
||||||
fmt.Printf("Requesting file %s does not exist\n", "./api"+fileid+".json")
|
fmt.Printf("Requesting file %s does not exist\n", "./api"+fileid+".json")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user