summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimportd
diff options
context:
space:
mode:
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
}