aboutsummaryrefslogtreecommitdiff
path: root/backend/api
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/routes.go1
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())
}
}