parent
a10dab96ff
commit
0a28c45a6c
|
@ -88,14 +88,17 @@ func importDomain(w http.ResponseWriter, r *http.Request) (string, error) {
|
||||||
log.Info(reason)
|
log.Info(reason)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if s != "" {
|
||||||
log.Warn("bad XML:", s)
|
log.Warn("bad XML:", s)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
// everything worked. add the events
|
// everything worked. add the events
|
||||||
for _, e := range events {
|
for _, e := range events {
|
||||||
me.cluster.AddEvent(e)
|
me.cluster.AddEvent(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Warn("Everything worked")
|
||||||
result := fmt.Sprintln("importDomain() worked")
|
result := fmt.Sprintln("importDomain() worked")
|
||||||
log.Log(WARN, result)
|
log.Log(WARN, result)
|
||||||
fmt.Fprintln(w, result)
|
fmt.Fprintln(w, result)
|
||||||
|
|
8
post.go
8
post.go
|
@ -6,7 +6,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -35,12 +34,5 @@ func httpPost(url string, data []byte) ([]byte, error) {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
return body, err
|
return body, err
|
||||||
}
|
}
|
||||||
|
|
||||||
test := strings.TrimSpace(string(body))
|
|
||||||
log.Info("go.wit.com returned body:", test)
|
|
||||||
if test == "OK" {
|
|
||||||
return body, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return body, nil
|
return body, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue