forked from gsn/predictor
feat: predictor works
This commit is contained in:
parent
11be8f351f
commit
7a9f81e527
20 changed files with 1357 additions and 1794 deletions
|
|
@ -71,10 +71,10 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
if len(elem) == 0 {
|
||||
// Leaf node.
|
||||
switch r.Method {
|
||||
case "POST":
|
||||
case "GET":
|
||||
s.handlePerformPredictionRequest([0]string{}, elemIsEscaped, w, r)
|
||||
default:
|
||||
s.notAllowed(w, r, "POST")
|
||||
s.notAllowed(w, r, "GET")
|
||||
}
|
||||
|
||||
return
|
||||
|
|
@ -205,9 +205,9 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) {
|
|||
if len(elem) == 0 {
|
||||
// Leaf node.
|
||||
switch method {
|
||||
case "POST":
|
||||
case "GET":
|
||||
r.name = PerformPredictionOperation
|
||||
r.summary = "Perform preidction"
|
||||
r.summary = "Perform prediction"
|
||||
r.operationID = "performPrediction"
|
||||
r.pathPattern = "/api/v1/prediction"
|
||||
r.args = args
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue