From a9b72af75a9f9cc2be8cdec581133c0e9a301520 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sun, 7 Mar 2021 08:13:10 -0800 Subject: remove ip from hash calculation --- backend/api/routes.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'backend/api/routes.go') 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()) -- cgit v1.2.3