diff options
Diffstat (limited to 'src/rhimportd/ctrlWebSimple.go')
-rw-r--r-- | src/rhimportd/ctrlWebSimple.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rhimportd/ctrlWebSimple.go b/src/rhimportd/ctrlWebSimple.go index 86e6893..b50f829 100644 --- a/src/rhimportd/ctrlWebSimple.go +++ b/src/rhimportd/ctrlWebSimple.go @@ -25,12 +25,13 @@ package main import ( - "code.helsinki.at/rhrd-go/rddb" - "code.helsinki.at/rhrd-go/rhimport" "encoding/json" "fmt" "html" "net/http" + + "code.helsinki.at/rhrd-go/rddb" + "code.helsinki.at/rhrd-go/rhimport" ) type webSimpleRequestData struct { @@ -91,7 +92,7 @@ func webSimpleResponse(w http.ResponseWriter, result *rhimport.Result) { encoder.Encode(respdata) } -func webSimpleParseRequest(conf *rhimport.Config, db *rddb.DB, trusted bool, r *http.Request) (ctx *rhimport.Context, err error) { +func webSimpleParseRequest(conf *rhimport.Config, trusted bool, r *http.Request) (ctx *rhimport.Context, err error) { decoder := json.NewDecoder(r.Body) reqdata := newWebSimpleRequestData(conf) if jsonerr := decoder.Decode(reqdata); jsonerr != nil { @@ -132,7 +133,7 @@ func webSimpleHandler(conf *rhimport.Config, db *rddb.DB, sessions *rhimport.Ses var ctx *rhimport.Context var err error - if ctx, err = webSimpleParseRequest(conf, db, trusted, r); err != nil { + if ctx, err = webSimpleParseRequest(conf, trusted, r); err != nil { webSimpleErrorResponse(w, http.StatusBadRequest, err.Error()) return } |