From f3f04a2c09bb42ee0892c235a0facfa3014c5420 Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Sun, 10 May 2020 11:31:58 -0600 Subject: Check for size of content and expiry time comparison --- backend/api/routes.go | 1 + 1 file changed, 1 insertion(+) (limited to 'backend/api') diff --git a/backend/api/routes.go b/backend/api/routes.go index ef8ccf7..a65c886 100644 --- a/backend/api/routes.go +++ b/backend/api/routes.go @@ -32,6 +32,7 @@ func insertFunc(w http.ResponseWriter, r *http.Request) { // insert content err := db.New(ip, content, expiry, title) if err != nil { + w.WriteHeader(http.StatusBadRequest) fmt.Fprintf(w, "got err: %s", err.Error()) } } -- cgit v1.2.3