Added beacon.html, with some refactor.
This commit is contained in:
@ -2,6 +2,7 @@ package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.eve.moe/jackyyf/navigator/api/beacon"
|
||||
"git.eve.moe/jackyyf/navigator/mapping"
|
||||
"git.eve.moe/jackyyf/navigator/mapping/firefly"
|
||||
@ -42,7 +43,9 @@ func init() {
|
||||
}
|
||||
remoteIp := utils.GetRemoteIP(req)
|
||||
go firefly.AddSpeedTestResult(remoteIp, request)
|
||||
resp.Header().Set("Content-Type", "application/json")
|
||||
resp.WriteHeader(http.StatusOK)
|
||||
fmt.Fprint(resp, "true")
|
||||
})
|
||||
beacon.RegisterApi("v1", serveMux)
|
||||
}
|
||||
|
Reference in New Issue
Block a user