summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimportd
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-05 14:33:38 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-05 14:33:38 (GMT)
commitf390aaa79bef626f69ced73b3eeb1f1ffea93c6d (patch)
treef8ec04c2a7a7e7485c7541f2a3c108adbdcee084 /src/helsinki.at/rhimportd
parentf2e1ae7dc36e6894d5f8e1d5b512d6b5437d4f21 (diff)
replaces FetchResult by ImportResult
Diffstat (limited to 'src/helsinki.at/rhimportd')
-rw-r--r--src/helsinki.at/rhimportd/ctrlWebSimple.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWebSimple.go b/src/helsinki.at/rhimportd/ctrlWebSimple.go
index 7a7af92..8af421f 100644
--- a/src/helsinki.at/rhimportd/ctrlWebSimple.go
+++ b/src/helsinki.at/rhimportd/ctrlWebSimple.go
@@ -135,27 +135,26 @@ func webSimpleHandler(conf *rhimport.Config, rddb *rhimport.RdDbChan, sessions *
return
}
- var fres *rhimport.FetchResult
- if fres, err = rhimport.FetchFile(ctx); err != nil {
+ var res *rhimport.ImportResult
+ if res, err = rhimport.FetchFile(ctx); err != nil {
webSimpleErrorResponse(w, http.StatusInternalServerError, err.Error())
return
}
- if fres.ResponseCode != http.StatusOK {
- webSimpleErrorResponse(w, fres.ResponseCode, fres.ErrorString)
+ if res.ResponseCode != http.StatusOK {
+ webSimpleErrorResponse(w, res.ResponseCode, res.ErrorString)
return
}
- var ires *rhimport.ImportResult
- if ires, err = rhimport.ImportFile(ctx); err != nil {
+ if res, err = rhimport.ImportFile(ctx); err != nil {
webSimpleErrorResponse(w, http.StatusInternalServerError, err.Error())
return
}
- if ires.ResponseCode == http.StatusOK {
+ if res.ResponseCode == http.StatusOK {
rhl.Println("ImportFile succesfully imported", ctx.SourceFile)
} else {
rhl.Println("ImportFile import of", ctx.SourceFile, "was unsuccesful")
}
- webSimpleResponse(w, ires)
+ webSimpleResponse(w, res)
return
}