diff options
| author | Ryan Mehri <[email protected]> | 2020-05-10 11:31:58 -0600 |
|---|---|---|
| committer | Ryan Mehri <[email protected]> | 2020-05-10 11:31:58 -0600 |
| commit | f3f04a2c09bb42ee0892c235a0facfa3014c5420 (patch) | |
| tree | e15df2eaeb78f2fa52836330cb4c09cb42d152f3 /backend/api | |
| parent | Merge pull request #8 from jackyzha0/react (diff) | |
| download | ctrl-v-f3f04a2c09bb42ee0892c235a0facfa3014c5420.tar.xz ctrl-v-f3f04a2c09bb42ee0892c235a0facfa3014c5420.zip | |
Check for size of content and expiry time comparison
Diffstat (limited to 'backend/api')
| -rw-r--r-- | backend/api/routes.go | 1 |
1 files changed, 1 insertions, 0 deletions
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()) } } |