empty query means default values
This commit is contained in:
parent
4d0b365d43
commit
38c5f0e29f
@ -19,6 +19,7 @@ package api
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
@ -72,8 +73,8 @@ func HandleRequest(m manager.Manager, w http.ResponseWriter, r *http.Request) er
|
||||
var query info.ContainerInfoQuery
|
||||
decoder := json.NewDecoder(r.Body)
|
||||
err := decoder.Decode(&query)
|
||||
if err != nil {
|
||||
fmt.Fprintf(w, "unable to decode the json value: %v", err)
|
||||
if err != nil && err != io.EOF {
|
||||
fmt.Fprintf(w, "unable to decode the json value: ", err)
|
||||
return err
|
||||
}
|
||||
// Get the container.
|
||||
|
Loading…
Reference in New Issue
Block a user