aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Mehri <[email protected]>2020-05-09 17:00:27 -0600
committerRyan Mehri <[email protected]>2020-05-09 17:00:27 -0600
commit63453abb06e44811f3f6f7458cd5824e897e1f7d (patch)
treefe078d33c11e21b684af8f400d1667b2411c5415
parentDelete go.sum (diff)
downloadctrl-v-63453abb06e44811f3f6f7458cd5824e897e1f7d.tar.xz
ctrl-v-63453abb06e44811f3f6f7458cd5824e897e1f7d.zip
Lowercase json response
-rw-r--r--api/routes.go4
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))