diff options
| author | Jacky Zhao <[email protected]> | 2020-05-10 10:34:22 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-10 10:34:22 -0700 |
| commit | 342e0b07c22e7b49b4db8ba93470a7a506a487c0 (patch) | |
| tree | e15df2eaeb78f2fa52836330cb4c09cb42d152f3 /backend/api | |
| parent | Merge pull request #8 from jackyzha0/react (diff) | |
| parent | Check for size of content and expiry time comparison (diff) | |
| download | ctrl-v-342e0b07c22e7b49b4db8ba93470a7a506a487c0.tar.xz ctrl-v-342e0b07c22e7b49b4db8ba93470a7a506a487c0.zip | |
Merge pull request #9 from jackyzha0/backend
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()) } } |