From d892cad72c1eb4ae20c1b7f1c5b9451650454c28 Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Mon, 11 May 2020 20:41:16 -0600 Subject: Add password check on post hash --- backend/api/api.go | 1 + 1 file changed, 1 insertion(+) (limited to 'backend/api/api.go') diff --git a/backend/api/api.go b/backend/api/api.go index 59242ef..59fecba 100644 --- a/backend/api/api.go +++ b/backend/api/api.go @@ -32,6 +32,7 @@ func Serve(port int) { r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST", "OPTIONS") r.HandleFunc("/api/{hash}", getHashFunc).Methods("GET", "OPTIONS") + r.HandleFunc("/api/{hash}", getHashWithPasswordFunc).Methods("POST", "OPTIONS") http.Handle("/", r) -- cgit v1.2.3 From 5f493fbdabad58412fba14b4c9534709d701192e Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Mon, 11 May 2020 20:55:49 -0600 Subject: Rename good --- backend/api/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/api/api.go') diff --git a/backend/api/api.go b/backend/api/api.go index 59fecba..9dd68a9 100644 --- a/backend/api/api.go +++ b/backend/api/api.go @@ -31,8 +31,8 @@ func Serve(port int) { r := mux.NewRouter() r.HandleFunc("/health", healthCheckFunc) r.HandleFunc("/api", insertFunc).Methods("POST", "OPTIONS") - r.HandleFunc("/api/{hash}", getHashFunc).Methods("GET", "OPTIONS") - r.HandleFunc("/api/{hash}", getHashWithPasswordFunc).Methods("POST", "OPTIONS") + r.HandleFunc("/api/{hash}", getPasteFunc).Methods("GET", "OPTIONS") + r.HandleFunc("/api/{hash}", getPasteWithPasswordFunc).Methods("POST", "OPTIONS") http.Handle("/", r) -- cgit v1.2.3