issue #64 completed for editor route
This commit is contained in:
1 parent
3fd60e487a
commit
3301b60485
7 files changed
+52
-63
No files matched your search
@@ -6,8 +6,12 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// RespondJSON
|
||||
// RespondJSON used to send JSON responses to the web server
|
||||
func RespondJSON(w http.ResponseWriter, message map[string]string, code int, err error) (int, error) {
|
||||
if message == nil {
|
||||
message = map[string]string{}
|
||||
}
|
||||
|
||||
msg, msgErr := json.Marshal(message)
|
||||
|
||||
if msgErr != nil {
|
||||
|
||||
Reference in new issue
Block a user