From 63453abb06e44811f3f6f7458cd5824e897e1f7d Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Sat, 9 May 2020 17:00:27 -0600 Subject: Lowercase json response --- api/routes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api') 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)) -- cgit v1.2.3