Compare commits
No commits in common. "ef253e214a48178a5e606f353d84b0c43da485d8" and "0a00ee8323c27cda5a92f80907c80acde8ef507b" have entirely different histories.
ef253e214a
...
0a00ee8323
4
api.go
4
api.go
@ -80,7 +80,7 @@ func (s *HTTPServer) RegisterAPIRoutes(r *mux.Router) {
|
|||||||
// Get message, either from URL query or multi part form.
|
// Get message, either from URL query or multi part form.
|
||||||
var message string
|
var message string
|
||||||
err := r.ParseMultipartForm(32 << 20) // maxMemory 32MB
|
err := r.ParseMultipartForm(32 << 20) // maxMemory 32MB
|
||||||
if err != nil {
|
if err == nil {
|
||||||
message = r.Form.Get("message")
|
message = r.Form.Get("message")
|
||||||
}
|
}
|
||||||
if message == "" {
|
if message == "" {
|
||||||
@ -89,6 +89,7 @@ func (s *HTTPServer) RegisterAPIRoutes(r *mux.Router) {
|
|||||||
|
|
||||||
// If no message provided, fail.
|
// If no message provided, fail.
|
||||||
if message == "" {
|
if message == "" {
|
||||||
|
log.Println("No message provided")
|
||||||
s.APISendGeneralResp(w, APIERR, "No message provided")
|
s.APISendGeneralResp(w, APIERR, "No message provided")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -112,6 +113,7 @@ func (s *HTTPServer) RegisterAPIRoutes(r *mux.Router) {
|
|||||||
|
|
||||||
// If no conversation found, likely will happen if no admin is configured, return error.
|
// If no conversation found, likely will happen if no admin is configured, return error.
|
||||||
if conversation == "" {
|
if conversation == "" {
|
||||||
|
log.Println("No conversation found")
|
||||||
s.APISendGeneralResp(w, APIERR, "No conversation found")
|
s.APISendGeneralResp(w, APIERR, "No conversation found")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user