summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-12 22:30:43 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-12 22:30:43 (GMT)
commit5fa11f11a0b5f71a94a8d18270a7baf4fb016330 (patch)
tree0a2f0719293578fce46ac6d9a6e25fb3f75cca1d
parentb40537d2a9730bf6db7cadc60eef357668b5dbf1 (diff)
fixed typos at json format for watch-dir and web-simple responses
-rw-r--r--src/rhimportd/ctrlWatchDir.go6
-rw-r--r--src/rhimportd/ctrlWebSimple.go2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/rhimportd/ctrlWatchDir.go b/src/rhimportd/ctrlWatchDir.go
index 7ab0a12..1b08e62 100644
--- a/src/rhimportd/ctrlWatchDir.go
+++ b/src/rhimportd/ctrlWatchDir.go
@@ -72,7 +72,7 @@ func newWatchDirRequestData(conf *rhimport.Config) *watchDirRequestData {
}
type watchDirResponseData struct {
- ResponseCode int `json:"REPONSE_CODE"`
+ ResponseCode int `json:"RESPONSE_CODE"`
ErrorString string `json:"ERROR_STRING"`
Cart uint `json:"CART_NUMBER"`
Cut uint `json:"CUT_NUMBER"`
@@ -124,7 +124,9 @@ func watchDirParseRequest(conf *rhimport.Config, db *rddb.DBChan, req *os.File)
ctx.AutotrimLevel = reqdata.AutotrimLevel
ctx.UseMetaData = reqdata.UseMetaData
ctx.SourceUri = reqdata.SourceUri
- err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ if reqdata.SourceFilePolicy != "" {
+ err = ctx.SourceFilePolicy.FromString(reqdata.SourceFilePolicy)
+ }
return
}
diff --git a/src/rhimportd/ctrlWebSimple.go b/src/rhimportd/ctrlWebSimple.go
index 7c5e569..05bbb4d 100644
--- a/src/rhimportd/ctrlWebSimple.go
+++ b/src/rhimportd/ctrlWebSimple.go
@@ -69,7 +69,7 @@ func newWebSimpleRequestData(conf *rhimport.Config) *webSimpleRequestData {
}
type webSimpleResponseData struct {
- ResponseCode int `json:"REPONSE_CODE"`
+ ResponseCode int `json:"RESPONSE_CODE"`
ErrorString string `json:"ERROR_STRING"`
Cart uint `json:"CART_NUMBER"`
Cut uint `json:"CUT_NUMBER"`