aboutsummaryrefslogtreecommitdiff
path: root/backend/api
diff options
context:
space:
mode:
authorRyan Mehri <[email protected]>2020-05-15 23:14:46 -0600
committerGitHub <[email protected]>2020-05-15 23:14:46 -0600
commit91b358a9f59f567a3f233aa1f912f1deca433c98 (patch)
treeab7fe8b5f50d2705fc3804562b66bc3dc773ef4b /backend/api
parentMerge pull request #25 from jackyzha0/security (diff)
parentadd view raw button (diff)
downloadctrl-v-91b358a9f59f567a3f233aa1f912f1deca433c98.tar.xz
ctrl-v-91b358a9f59f567a3f233aa1f912f1deca433c98.zip
Merge pull request #26 from jackyzha0/raw-button
add view raw button
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/routes.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/backend/api/routes.go b/backend/api/routes.go
index 474fdda..26c932f 100644
--- a/backend/api/routes.go
+++ b/backend/api/routes.go
@@ -3,15 +3,14 @@ package api
import (
"encoding/json"
"fmt"
- "github.com/jackyzha0/ctrl-v/security"
"net/http"
"time"
+ "github.com/jackyzha0/ctrl-v/security"
+
"github.com/gorilla/mux"
"github.com/jackyzha0/ctrl-v/cache"
"github.com/jackyzha0/ctrl-v/db"
-
- log "github.com/sirupsen/logrus"
)
func healthCheckFunc(w http.ResponseWriter, r *http.Request) {
@@ -33,8 +32,6 @@ func insertFunc(w http.ResponseWriter, r *http.Request) {
// get ip
ip := getIP(r)
- log.Infof("got content '%s' and ip '%s'", content, ip)
-
// insert content
hash, err := db.New(ip, content, expiry, title, password)
if err != nil {