aboutsummaryrefslogtreecommitdiff
path: root/backend/api/routes.go
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-03-07 08:13:10 -0800
committerjackyzha0 <[email protected]>2021-03-07 08:13:10 -0800
commita9b72af75a9f9cc2be8cdec581133c0e9a301520 (patch)
treef8d966ca52919047eb8fa74822af7c5d90d29710 /backend/api/routes.go
parentMerge pull request #71 from jackyzha0/http-refactor (diff)
downloadctrl-v-a9b72af75a9f9cc2be8cdec581133c0e9a301520.tar.xz
ctrl-v-a9b72af75a9f9cc2be8cdec581133c0e9a301520.zip
remove ip from hash calculation
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())