aboutsummaryrefslogtreecommitdiff
path: root/backend/api/routes.go
diff options
context:
space:
mode:
authorJacky Zhao <[email protected]>2021-03-08 00:05:08 -0800
committerGitHub <[email protected]>2021-03-08 00:05:08 -0800
commit9aa8dc921f03a08ca8987e4ca3f3f66a1f4b4981 (patch)
treebffadcdef97795ce411231a74207f48165dcb96a /backend/api/routes.go
parentcss fix (diff)
parentremove ip from hash calculation (diff)
downloadctrl-v-9aa8dc921f03a08ca8987e4ca3f3f66a1f4b4981.tar.xz
ctrl-v-9aa8dc921f03a08ca8987e4ca3f3f66a1f4b4981.zip
Merge pull request #72 from jackyzha0/no-ip
Diffstat (limited to 'backend/api/routes.go')
-rw-r--r--backend/api/routes.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/backend/api/routes.go b/backend/api/routes.go
index d05e99a..c4a457f 100644
--- a/backend/api/routes.go
+++ b/backend/api/routes.go
@@ -30,11 +30,8 @@ func insertFunc(w http.ResponseWriter, r *http.Request) {
password := r.FormValue("password")
lang := r.FormValue("language")
- // get ip
- ip := getIP(r)
-
// insert content
- hash, err := db.New(ip, content, expiry, title, password, lang)
+ hash, err := db.New(content, expiry, title, password, lang)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
fmt.Fprintf(w, "%s", err.Error())