diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-01-05 14:45:56 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-01-05 14:45:56 (GMT) |
commit | ff149324fb78e2cb0ae2484c79c052f38c27d4d2 (patch) | |
tree | eaf95faf61be86ef278cdbcaf6701f0a400cb65a /src/helsinki.at/rhimportd/ctrlWebSimple.go | |
parent | f390aaa79bef626f69ced73b3eeb1f1ffea93c6d (diff) |
removed Import prefix of some types
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlWebSimple.go')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWebSimple.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWebSimple.go b/src/helsinki.at/rhimportd/ctrlWebSimple.go index 8af421f..9a408ed 100644 --- a/src/helsinki.at/rhimportd/ctrlWebSimple.go +++ b/src/helsinki.at/rhimportd/ctrlWebSimple.go @@ -82,7 +82,7 @@ func webSimpleErrorResponse(w http.ResponseWriter, code int, errStr string) { encoder.Encode(respdata) } -func webSimpleResponse(w http.ResponseWriter, result *rhimport.ImportResult) { +func webSimpleResponse(w http.ResponseWriter, result *rhimport.Result) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusInternalServerError) encoder := json.NewEncoder(w) @@ -90,7 +90,7 @@ func webSimpleResponse(w http.ResponseWriter, result *rhimport.ImportResult) { encoder.Encode(respdata) } -func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDbChan, trusted bool, r *http.Request) (ctx *rhimport.ImportContext, err error) { +func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDbChan, trusted bool, r *http.Request) (ctx *rhimport.Context, err error) { decoder := json.NewDecoder(r.Body) reqdata := newWebSimpleRequestData(conf) @@ -103,7 +103,7 @@ func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDbChan, trust if trusted { username = r.Header.Get("X-Forwarded-User") } - ctx = rhimport.NewImportContext(conf, rddb, username) + ctx = rhimport.NewContext(conf, rddb, username) ctx.Password = reqdata.Password ctx.Trusted = trusted ctx.ShowId = reqdata.ShowId @@ -123,7 +123,7 @@ func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDbChan, trust func webSimpleHandler(conf *rhimport.Config, rddb *rhimport.RdDbChan, sessions *rhimport.SessionStoreChan, trusted bool, w http.ResponseWriter, r *http.Request) { rhdl.Printf("WebSimpleHandler: request for '%s'", html.EscapeString(r.URL.Path)) - var ctx *rhimport.ImportContext + var ctx *rhimport.Context var err error if ctx, err = webSimpleParseRequest(conf, rddb, trusted, r); err != nil { webSimpleErrorResponse(w, http.StatusBadRequest, err.Error()) @@ -135,7 +135,7 @@ func webSimpleHandler(conf *rhimport.Config, rddb *rhimport.RdDbChan, sessions * return } - var res *rhimport.ImportResult + var res *rhimport.Result if res, err = rhimport.FetchFile(ctx); err != nil { webSimpleErrorResponse(w, http.StatusInternalServerError, err.Error()) return |