diff options
| author | Ryan Mehri <[email protected]> | 2020-05-09 17:00:27 -0600 |
|---|---|---|
| committer | Ryan Mehri <[email protected]> | 2020-05-09 17:00:27 -0600 |
| commit | 63453abb06e44811f3f6f7458cd5824e897e1f7d (patch) | |
| tree | fe078d33c11e21b684af8f400d1667b2411c5415 | |
| parent | Delete go.sum (diff) | |
| download | ctrl-v-63453abb06e44811f3f6f7458cd5824e897e1f7d.tar.xz ctrl-v-63453abb06e44811f3f6f7458cd5824e897e1f7d.zip | |
Lowercase json response
| -rw-r--r-- | api/routes.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/routes.go b/api/routes.go index a5d0357..ff65e89 100644 --- a/api/routes.go +++ b/api/routes.go @@ -48,8 +48,8 @@ func getHashFunc(w http.ResponseWriter, r *http.Request) { // otherwise, return paste content and current time w.Header().Set("Content-Type", "application/json") pasteMap := map[string]interface{} { - "Timestamp": time.Now(), - "Content": paste.Content, + "timestamp": time.Now(), + "content": paste.Content, } jsonData, _ := json.Marshal(pasteMap) fmt.Fprintf(w, "%+v", string(jsonData)) |