added code mirror to edit big queries.
This commit is contained in:
1 parent
c38f4dd1f5
commit
649f7910b1
6 files changed
+46
-4
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type errorWrapper struct {
|
||||
Error error `json:"error"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
type ApiHandler func(w http.ResponseWriter, request *http.Request) (interface{}, error)
|
||||
@@ -16,7 +16,7 @@ func (this ApiHandler) ServeHTTP(w http.ResponseWriter, request *http.Request) {
|
||||
ret, err := this(w, request)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
ret = &errorWrapper{err}
|
||||
ret = &errorWrapper{err.Error()}
|
||||
w.WriteHeader(500)
|
||||
} else {
|
||||
w.WriteHeader(200)
|
||||
|
||||
Reference in new issue
Block a user