summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWebSimple.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-29 00:04:00 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-29 00:04:00 (GMT)
commit1b9e777c9cec218e040166dd5ae12c5bde843f20 (patch)
treeaad77761c19e22300ecfdaba623aff0f7568350c /src/rhimportd/ctrlWebSimple.go
parent29c5920353da2ff8811d1518b411dfe957e397f5 (diff)
watch dir control interface uses session
Diffstat (limited to 'src/rhimportd/ctrlWebSimple.go')
-rw-r--r--src/rhimportd/ctrlWebSimple.go9
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
}